• I am using MAMP for hosting locally. My wp is installed in windows C: > MAMP > htdocs > clout-inc > all wp unzipped files . I have tried creating my own wp-config file and it throws an error. When I delete my created file and run the WP install and put root as both my username and password it says it can’t establish connection, Apache and MySQL servers are both up. Proper ports for MAMP, the database title is the same one as the one that I made in myPHPAdmin, so… hmm?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter vassilkurk

    (@vassilkurk)

    Welp, going into MAMP preferences and changing port from 3307 to 3306 id the trick. Maybe someone can explain why that is?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    3306 is the standard port used by MySQL.

    Thread Starter vassilkurk

    (@vassilkurk)

    @sterndata is there a particular reason MAMP initiated with 3307 rather than the standard?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I don’t know. I’ve never used it. If you have MAMP specific questions, best ask the MAMP folks directly.

    @vassilkurk great question! While @sterndata is right regarding the default MySQL port, sometimes it needs to be different because your system is already using said port. In this case, if you have another port, you can change the setting in the wp-config.php file to match the MySQL port you are using.

    For example, on our local machines we use 8889, and our config entry looks like

    /** MySQL hostname */
    define('DB_HOST', '127.0.0.1:8889');

    Warm regards!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error Establishing Database Connection (MAMP)’ is closed to new replies.