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:
- Change the password in the config.inc.php file. I couldn't find the other files mentioned, probably because I'm not using Pro. MySQL and PhpMyAdmin config.inc.php Password issue on MAMP
- Change the user and password
$cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'NewPassword';
to blank values and add$cfg['Servers'][$i]['AllowNoPassword'] = false;
. Changed password in phpMyAdmin on a Mac using XAMPP, now unable to access localhost/phpmyadmin - Used terminal to change the password back to 'root', and change config.inc.php back to default. http://www.mamp.info/en/documentation/faq.html#q9
- Tried step 2 without 'AllowNoPassword'
- Changed
$cfg['Servers'][$i]['host'] = 'localhost';
to$cfg['Servers'][$i]['host'] = '127.0.0.1';
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.