• greenn

    (@greenn)


    Hi, I’m total beginner with WordPress. I installed WAMP locally on my PC and followed Youtube – everything was OK. Then I tried to install WordPress 6.6.2 (again by fully following Youtube) but always I’m getting “Error establishing a database connection” problem. I found few pages with this problem and Youtube channels but they didn’t help. I’m totally frustrated now.

    Can someone help me why is this happening?

    Thanks, regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • Sainath Poojary

    (@sainathpoojary)

    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.

    threadi

    (@threadi)

    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: https://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)

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.