How to get info of MySQL Settings in wp-config.php
The WordPress's wp-config.php
file is a configuration file created during the WordPress installation process. It stores critical database information such as the database name, username, password, and host.
Besides facilitating the connection between your WordPress site and its database, the wp-config.php
file is also used by WordPress to implement advanced settings on the site.
This configuration file is located in your website's root folder. You can access the wp-config.php
file by going through; WP Dashboard>> File Manager>> example.com (main domain folder), also known as/public_html
directory.

Editing the wp-config.php
file
wp-config.php
fileIn other to edit the file, you have two options;
Select the file and click on the icon (1) as shown in the screenshot to follow
Select the file and right+click to see further actions, then choose edit file (2), use any of the available editors; ACE Editor, CodeMirror, TextArea.

Getting the MySQL information
After editing the wp-config.php
file, the secret credentials and other bits of information you need to connect to the database server and run queries will become visible.
Here are the lines of files with the information you might need to know.
define( 'DB_HOST', 'localhost' ); // Hostname
define( 'DB_USER', 'username_here' ); // MySQL credentials
define( 'DB_PASSWORD', 'password_here' );
define( 'DB_NAME', 'my_wp_db' ); // database name
$table_prefix = 'pf_'; // tablename prefix

Last updated