Search code examples
phpmysqlmamp

Changed root password for phpMyAdmin, now I can't access anything MAMP


I thoroughly searched StackOverflow and Google to find an answer to this and so far nothing has helped. It's killing me because my project was pretty much finished!

In the control panel in phpMyAdmin I changed the password for the root user from 'root' to a new password. When I quit working and came back to it I couldn't connect to the server through MAMP, receiving this error:

Checking MySQL databases failed. Error message: /Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

And this error on my localhost page:

Error: Could not connect to MySQL server!

I tried many things to try to resolve this issue, most of which I found from other SO questions. They are as follows:

I tried a bunch of other things like changing the auth_type to html, adding controluser and controlpass, and other things but no luck. Nothing seems to work.


Solution

  • If you have tried the old password and it still did not work, then you can try changing the password again.

    http://www.mamp.info/en/documentation/faq.html#q9

    EDIT

    In order to debug if it is the MySQL or PHPMyAdmin that is the problem now, please try this.

    Access MAMP's MySQL from Terminal

    See if you can connect to mysql on the command line, if you can then we know it is your phpmyadmin config that is wrong, if not then it is the mysql server that is wrong.