learned from http://www.nyayapati.com/srao/2011/03/mamp-mysqlcheck-got-error-1045/
MAMP - mysqlcheck: Got error: 1045
I started seeing the following error every time I started MAMP. This began after I changed the root password for my MAMP installation on my MBP.
1
| /Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect |
It turns out that the default password is hard coded in different scripts under ‘/Applications/MAMP/bin’. In my case the script quickCheckMysqlUpgrade.sh. Just edit the script to have the correct password and you wont see the annoying message again.

Thanks!
ReplyDeleteI got tripped up by the lack of a space between the -p flag and the password: note -pmypass where mypass is my password!
# /bin/sh
/Applications/MAMP/Library/bin/mysqlcheck --all-databases --check --check-upgrade -u root -pmypass --socket=/Applications/MAMP/tmp/mysql/mysql.sock
Find the three files:
grep -s 'mysqlcheck' /Applications/MAMP/bin/*
Thanks to both Xue and Tim, I got that annoying error to stop.
ReplyDeleteYou're welcome! Glad it helps.
ReplyDelete