Posted by rotnme on March 17, 2010 at 2:44am
My MAMP blew up weeks ago. Since then I have been restoring it, no problems until this. "/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect"
Have been trying to get to the bottom of this for two nights and have no idea. Start page loads, I can access the local site but am confused as to this error. I have changed all necessary passwords. I'm at a loss. Thoughts? Thanks in advance.

Comments
Details
I'm not clear what you mean by "restore." To a default installation, or what? Which version of MAMP?
Context is helpful: when are you seeing this error? What screen? After what action? The default password for MAMP's mysql's root account is "root" btw.
Restore meaning deleting the
Restore meaning deleting the whole thing and starting over. MAMP 1.8.4. The error message comes up on the mamp initial window, status, apache server mysql server, sop servers, open start page, preferences, quit. Upon start. I know the default pw is root and have gone thru the changes to alter it to mine.
Continuing on
I'm not asking you to be difficult. I use MAMP/XAMPP on Mac and linux machines every day and I don't see these issues, so I presume language is failing us in understanding what ails you.
So I read this to mean that by "restore" you mean that you've deleted the old MAMP directory, emptied the trash, (no errors after doing so) and downloaded a new directory of MAMP and installed it to your /Applications directory? When you say you changed the root password for your mysql root account, how did you change it?
In the last thread on this topic, you found that there were running instances of MySQL outside of MAMP.
If you reboot your computer, and do not load MAMP, open terminal and type:
ps aucx | grep mysqld(Type the enter key after "mysqld")
What do you see?
Could be MySQL security setting problems
Judging from the error, this is because MAMP is doing table optimizations (which work best if in single user mode) inside various commands.
The denied access could be due to either the script not having the correct root password or it could be that root has lost it's right to connect from the local machine.
First, try the edits listed in the post below to make sure the MAMP scripts have the correct root password stored.
http://forum.mamp.info/viewtopic.php?p=4104#p4104
If this doesn't work, can you get to the MAMP PhPMyAdmin page?
If so, try going to the Privileges section and verify that there is an entry with User=root / Host=localhost / Password=Yes / Global Privileges=ALL PRIVILEGES
If there isn't, add one to allow root access from localhost.