1
votes

I am very new to SQL in fact, I have only just started learning it today. I am following a tutorial and changed the SQL password in MAMP via phpMyAdmin => Users then I edited priviliges on the root user changing the password. I then went into the config.inc.php file and changed the password there to reflect the new password.

Whenever I log into MAMP everything works but I get this exact error message:

Checking the 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

Please bare in mind I am a complete beginner so any advice will need to be pretty concise or easy to follow. Thanks in advance.

4

4 Answers

2
votes

If you're getting that message, then everything's definitely not OK ;)

SUGGESTION:

Try resetting the mysql "root" password from the command line:

/Applications/MAMP/Library/bin/mysqladmin -u root -p password newpassword

See also this link:

https://drupal.org/node/1469542

It may sound stupid, but just check, double-check, and triple-check that you have all your DB settings correct in settings.php. (database, username, password, host, etc... in the $database array declaration)

I thought I was spot on, got the same error. Checked it again, it looked right, still error. Checked it a third time and found one character off. Fixing that got rid of the error.

1
votes

I had to change my password throughout a number of files. Here is the link that worked for me - http://stunningpeak.com/blog/mamp-change-root-pasword

1
votes

There are certain scripts in the MAMP directory that have the root password hard coded into it. MAMP can be working just fine but you will receive error messages on each start-up. Those scripts need to be changed to your new password to stop the error messages.

There is a page here explaining how to do it: http://www.tech-otaku.com/local-server/changing-mysql-root-user-password-mamp/#mamp-files-to-update

-1
votes

Ironically I fixed this problem by turning my computer off and on again.

Just restarting Mamp didn't help.