Forums

[resolved] Problems installing with MAMP, "Error establishing a database connection" (11 posts)

  1. gibranfeliciano
    Member
    Posted 8 months ago #

    I want to run a new theme for my site from my MAC using MAMP and after following all the instructions i get this message "Error establishing a database connection". Any help would be appreciated.

  2. Jeremy
    Member
    Posted 8 months ago #

    This error message can appear for different reasons, so it is difficult to give you an exact solution.

    Did you modify the wp-config.php to add your database parameters there?

    define( 'DB_NAME', 'your-database-name-that-you-created-on-phpmyadmin' );
    define( 'DB_USER', 'root' );
    define( 'DB_PASSWORD', 'root' );
    define( 'DB_HOST', 'localhost' );
  3. gibranfeliciano
    Member
    Posted 8 months ago #

    Yes. First I created the database with phpmyadmin in the Start page of MAMP and I also created it with my hosting service from godaddy. With godaddy it didnt allow me to use root as User and Pword so I changed both. I also tried using localhost as the host name or the host name that godaddy provided. Part of what I dont understand from the instructions is that if Im going to use my MAC to run wordpress why do I need to create the database with godaddy.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 8 months ago #

    why do I need to create the database with godaddy

    You don't.

  5. gibranfeliciano
    Member
    Posted 8 months ago #

    So I only have to create it in the phpadmin in the start page of MAMP? Also, in order to use MAMP i have to configure the PHP with the name of the database i created in Mamp, the user and pw root and the host name localhost?

  6. esmi
    Theme Diva & Forum Moderator
    Posted 8 months ago #

    So I only have to create it in the phpadmin in the start page of MAMP?

    Yes. Then edit your wp-config.php file with the name of the database, user, user password and host (which is probably localhost)

  7. gibranfeliciano
    Member
    Posted 8 months ago #

    I edited the config.php file correctly, I created the database in MAMP. WordPress is in the HTDOCS of MAMP. How can I run the page now. Do I use Safari?

  8. fonglh
    Member
    Posted 8 months ago #

    Do I use Safari?

    Yes. http://localhost/wp-admin/install.php

    MAMP may need a port number, so it might be http://localhost:8888/wp-admin/install.php or something along those lines. Exact number may differ depending on how MAMP is setup.

  9. gibranfeliciano
    Member
    Posted 8 months ago #

    Thanks a million for all the help. After following all the instructions it still was not working and i noticed that when I edited the wp-config.php with text editor, i was not saving it as a php so I wasnt seeing anything with localhost:8888. Thanks again to all of you.

  10. tonyakeittkalule
    Member
    Posted 7 months ago #

    I am having this trouble too. I have done all of the above and getter the error below

    Not Found

    The requested URL /wordpress/wp-admin/ was not found on this server.

  11. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 7 months ago #

    tonyakeittkalule - You should make your own post, since this one is resolved.

    Make sure MAMP is working correctly, too.

Reply

You must log in to post.

About this Topic

Tags