Viewing 10 replies - 1 through 10 (of 10 total)
  • Do you have a GUI database tool ? If not suggest you install phpmyadmin.
    In any case make sure that the host/database/user/password you set in wp-config.sys let you login to your database.

    If you used the default settings for MAMP and did not add a database user when you created the new database, then these are the values you require:

    Database Name: whatever you named it (make sure the name you gave it contains no spaces)
    User Name: root (this is the default MAMP database user name)
    Password: root (this is the default MAMP database password)
    Database Host: localhost
    Table Prefix: wp_ (leave as-is)

    @rossmitchell – MAMP comes with phpMyAdmin and the default values for the DB server are noted above ??

    Thread Starter ayadmirjan

    (@ayadmirjan)

    Thank you both!
    @2ninerniner2: I did exactly that and it is not working. I keep getting this error. I am running out of options. ??

    OK, a couple of other things then:

    – are both servers running
    – are your WP files in Applications/MAMP/htdocs/sitename
    – did you use the default MAMP settings, that is, you did not change the document root nor the ports
    – you would normally start the install with:

    https://localhost:8888/sitename

    – if all that has been done, then try it using a new database
    – fire up phpMyAdmin, click the Databases tab, and enter wordpress2 as the database name and then click Create

    – use this name now as the Database name along with the root and root as User and Pwd.

    Thread Starter ayadmirjan

    (@ayadmirjan)

    – are both servers running: Hmm…How can I make sure that they are both running?
    – are your WP files in Applications/MAMP/htdocs/sitename: Yes
    – did you use the default MAMP settings, that is, you did not change the document root nor the ports: Yes, i used the default settings
    – you would normally start the install with:

    https://localhost:8888/sitename: Correct and that’s when I’m getting the error

    – if all that has been done, then try it using a new database
    – fire up phpMyAdmin, click the Databases tab, and enter wordpress2 as the database name and then click Create

    – use this name now as the Database name along with the root and root as User and Pwd.
    I created another database and called it wordpress2. When logging into https://localhost:8888/wordpress2/wp-admin/install.php I get the same error.

    Thread Starter ayadmirjan

    (@ayadmirjan)

    Problem resolved!!!!! And as always, it was something incredibly ridiculous. Instead of renaming the wordpress folder and moving it under htdocs, I was only taking its contents and placing them under a different folder in htdocs. Believe it or not, that was the problem. Thank you guys for all your help!

    I’m having this exact same problem but can’t seem to get it fixed either.

    What did you rename the wordpress folder as?? I tried moving the whole folder and also tried just moving the contents into the htdocs folder but neither of those worked.

    Mine doesn’t work either. I’m trying to get an installation working with MAMP on a mavericks mac. I have triple checked my user name, password, wordpress folder name and database name (they are the same) in my wp-config.php and I still get the unable to connect to database error. BTW both of my servers are running as well. Frustrated as can be.

    Exactly!! I’m running a Mavericks Mac too. I’m beyond annoyed but so glad I’m not the only one having this issue…hopefully we both get this fixed soon!!

    @sarahbeth09 and @craigmura11 – as per forum rules, please each start your own thread for your questions.

    Also, this thread has been marked resolved.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘"Error establishing a database connection"’ is closed to new replies.