'#1045 - Access denied for user 'root'@'localhost' (using password: YES) MAMP MySQL access denied

I'm trying to copy a live WordPress site to my local server. I went to import the database from the live site through MAMP, and I received an error message when trying to connect to phpMyAdmin:

#1045 - Access denied for user 'root'@'localhost' (using password: YES)

I have a couple local WP installations running already, and I'm able to access them through the localhost:8888/sitename path just fine.

I haven't changed any passwords or messed around with any configurations in phpMyAdmin. In fact, it was all working fine just yesterday. I had to re-boot my computer because it froze on me this morning, and that's when the issues began.

I even went into the config.inc.php file in Applications/MAMP/phpMyAdmin, and the usernames and passwords match what I had originally. (It definitely wasn't 'YES')

I'm stumped at this point. Could anyone help?



Solution 1:[1]

Can you try resetting the MySQL server password using this guide. Then put the new password in the PHPMyAdmin config?

using password: YES Means that you attempted to login using a password, not that the password used is 'YES' Its referring to the different options for logins like certificates etc.

Solution 2:[2]

Try to use single quotes in password, cause the symbol $ inside double quotes is like aphp variable

Solution 3:[3]

change the password to a more basic form. for example i had "!@#$]#$%^%&^" i changed it to "mypassword1" and it worked. It is a wordpress issues that it doesn't support weird characters.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nick
Solution 2 Kiriakos Grhgoriadhs
Solution 3 user2030856