'first time install of MAMP & no previous install of Mysql - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Please note, I am using MAMP and Windows 10.
I've scoured stack overflow for hours trying to find a solution to this, but nothing seems to be for the same issue via mamp, and the fixes appear to be to mysql installed and run a different way.
I'm newish to coding with a back end, so please forgive my ignorance if I've missed something basic.
From what I understand, somehow mysql has decided to farbricate a random password despite me never setting one, and wont let me in when I try and log in with either
mysql -u root -p
or
mysql -u root
As I understand it, the password should be a blank string for the root user.
Instead I get
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Whilst logging in without the -p flag, and
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
When attempting to log in with it.
I believe resetting the root password may fix this, but I can't find a guide on how to do this with MAMP and I get lost trying to work out the process with different installs.
Any help would be greatly appreciated.
I've tried deleting MAMP entirely, including all databases etc, complete wipe, and the reinstall has the same issue.
Solution 1:[1]
Turns out I'm stupid, and the password isn't blank. On MAMP the password is the same as the username (root)
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 | Matt Fuller |
