• Resolved hanglu

    (@hanglu)


    Hi, I’m a total newbie who just found out how to install WordPress on my localhost.

    I searched everywhere on the web for the solution and had to combine many solutions together just to get WordPress to work, but when I finally solved my issue, I found out it was actually quite simple.

    I kept getting “Error Establishing a Database Connection”, which meant two issues in my case.

    1 – My MAMP mySQL root password was not, “root”, like written on the documentation. In fact, it was empty.
    2 – There was no database for my /wordpress site.

    Solution for 1
    Went on the MySQL tab on MAMP.
    Changed the password to whatever I liked.
    Went on the wp-config.php file of my /wordpress folder.
    Changed the database password to new root MySQL

    Solution for 2
    I downloaded phpMyAdmin, installed it, and launched it from MAMP.
    Then, I went on the “Database” tab and created a database the same name as the folder where I put the wordpress files. In my case “wordpress” under the type “Collation”.

    Relaunched wordpressed and worked like a charm!

  • The topic ‘Solved – Error Establishing a Database Connection’ is closed to new replies.