Error establishing a database connection, XAMPP
-
I installed WordPress on XAMPP. I get an error: “Error establishing a database connection”. As far as I know, “The ‘Error establishing a database connection’ issue can be caused by incorrect database information in your WordPress settings, corrupt database, or an irresponsive database server.” (https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/)
In wp-config.php I have:
define(‘DB_NAME’, ‘wordpress’);
/** MySQL database username */
define(‘DB_USER’, ‘root’);
/** MySQL database password */
define(‘DB_PASSWORD’, ”);
/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);PhpMyAdmin starts up without any problem. The database is there and is called ‘wordpress’. config.inc.php file contains the following data:
$cfg[‘Servers’][$i][‘user’] = ‘root’;
$cfg[‘Servers’][$i][‘password’] = ”;
$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’;So the database login credentials are correct, right? If yes, what else should I check?
- The topic ‘Error establishing a database connection, XAMPP’ is closed to new replies.