Much like changing your WordPress Site URL, WordPress database settings can be configured in the wp-config.php file. Simply edit the following lines in the wp-config.php to update your database host, name, username, and password:
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘myDBname’);/** MySQL database username */
define(‘DB_USER’, ‘myDBuser’);/** MySQL database password */
define(‘DB_PASSWORD’, ‘myDBpassword’);/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);