• Resolved niamhomd

    (@niamhomd)


    Hi there,

    I’m having issues after setting up MAMP; getting “Error establishing a database connection” when visiting http://localhost:8888/wordpress/ (incidentally, getting a 404 Not Found when visiting http://localhost:8888/wp-admin/install.php directly)

    I have set-up Mamp with the following preferences:
    Apache Port: 8888
    MySQL Port: 8889
    WebServer E:\MAMP\htdocs

    Now, since I have set-up WordPress through Mamp & through my E: drive before; I’m not sure why it might be throwing this issue but do I need to change some parameters somewhere else in order to read E: ?

    It’s the only thing I can think of!

    wp-config.php snippet is as follows:
    define(‘DB_NAME’, ‘wordpress’);
    define(‘DB_USER’, ‘root’);
    define(‘DB_PASSWORD’, ‘root’);
    define(‘DB_HOST’, ‘localhost’);
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    mySQL connection parameters are:
    Host: localhost
    Port: 8889
    User: root
    Password: root

    & a database called wordpress has been created through myPHPadmin

    the latest install of wordpress is residing locally at E:/MAMP/htdocs/wordpress

    I’m stumped!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • +1
    I have been having precisely the same issue with the same exact parameters, think it may have something to do with the WP update? Because I was having no issues with getting WP to run locally through MAMP in the previous version XD

    Some things I’ve tried with no avail (listing this to hopefully either reinforce the ticket or keep you from repeating the same actions I did) are…
    – Moving everything to C:
    – Various input for HOST in setup-config.php (localhost:8888 seemed promising at first then white screened)
    – Both, MAMP default ports, & given port values
    – Default DB user account (wordpress/root/root/localhost)
    new DB user (wordpress/root/root/localhost:8888)
    alternate new user (wordpress/zezzer/password/localhost)
    All with full permissions and each tried with the variations of HOST parameter

    – Editing the wp-config.php to coincide with each attempt
    – Reinstalling MAMP & WP

    Followed the instructions to the letter, and still hitting the same error message.

    On the other hand, I did get it to run on WAMP (though I personally would rather use MAMP) with little to no hassle. Same process for the most part
    -setup wamp
    -put the WP file in E:/wamp/www
    -Open browser, type ‘localhost/wordpress’ in the navbar
    -Fill out the config set up, DB name ‘sparkle_fungus_or_something’ user ‘root’, password make blank, host ‘localhost’

    maybe that will help for the time being if you have a project to knock out

    XD

    Thread Starter niamhomd

    (@niamhomd)

    Hi Zezzer,

    I sorted the issue earlier today thankfully! I was starting to loose my mind with it.

    In the end I think it had something to do with my firewall settings in BitDefender (updated to 2015 a few days ago so it must have saved new settings).

    I set up exclusions in the software & then it ran just fine.
    Also had to use 3306 port value.

    Now everything works fine & it’s all set up!

    Thanks so much for your reply 😀

    Hooray for success!

    It was an rather painful evolution running through the steps correctly and getting the ‘meh, you’re wrong’ page… I’ll give MAMP another shot here with the criteria you suggested and check my firewall.

    Glad it worked out, have a good one mate!

    Thread Starter niamhomd

    (@niamhomd)

    Hooray for sure!!!

    So frustrating. You may need to use 3306 but I had tried it that way also numerous times initially & still no joy.

    Definitely give the firewall settings a go.

    I set up an exclusion in the antivirus for e:\mamp\bin\vctests\testvc11.exe
    & also, just in case, e:\mamp (incidently, I’m on windows)
    then I added a rule in the firewall to allow mamp.exe

    Hope it helps!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error establishing a database connection at http://localhost:8888/wordpress/’ is closed to new replies.