Error establishing a database connection
-
I have installed wordpress on my machine (localhost, macOSX) and everything worked for a few months with no problem.
yesterday I got the message
“Error establishing a database connection”
Google it and try to fix it:
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server
however I can connect to the database (Server version: 5.5.0-m2 MySQL Community Server (GPL)) with
mysql -h localhost -u wordpress -pI can see the database with its tables…
and If I open wp-config.php (which I haven’t modify) it is:
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'drybook'); /** MySQL database username */ define('DB_USER', 'wordpress'); /** MySQL database password */ define('DB_PASSWORD', 'wp_pwd'); /** MySQL hostname */ define('DB_HOST', 'localhost'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');So, to me the database is up and running and the config file is ok…
The topic ‘Error establishing a database connection’ is closed to new replies.