Hey @greenn,
The “Error establishing a database connection” is a common issue during WordPress installation. This typically occurs when the database credentials in the wp-config.php file are incorrect.
Here are some possible solutions:
Step 1: Verify that MySQL is up and running. If it’s not, try resolving that issue first.
Step 2: If MySQL is running correctly, check the wp-config.php file and ensure the database configuration constants are correctly set in following constants.
/** The name of the database for WordPress */
define( 'DB_NAME', 'local' );
/** Database username */
define( 'DB_USER', 'root' );
/** Database password */
define( 'DB_PASSWORD', 'root' );
/** Database hostname */
define( 'DB_HOST', 'localhost' );
This should likely resolve your issue. Feel free to reach out if you encounter any other problems.
You must enter the access data stored in your database when installing WordPress. Of course, the database service must also be accessible. How you can accomplish both depends on how WAMP is configured. I would recommend that you contact their support forum: http://forum.wampserver.com/
‘Error establishing a database connection’ usually happens when your WordPress can’t connect to the database. Please check if your wp-config.php file has the correct database name, username, password, and host. Also, make sure your MySQL server is running. Make sure your server is running.
Thread Starter
greenn
(@greenn)
thanks, I needed to do the update to —> define(‘DB_HOST’,’127.0.0.1:3307)