I have MySQL 5.7.25 installed in Amazon Ec2.
I have been accessing the Db via ssh into Ec2 and then connect to MySQL -u root -p
While creating a new user (non-root) I messed up with "identified by " clause for the new user.
From then on, I was not at all able to login. So then followed articles in Stackoverflow and tried a) https://stackoverflow.com/a/44432921/3705478 b) MySql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
But still, I was facing issues. issues now I'm facing.
1) I had to add skip-grant-tables
in my.cnf as mentioned here https://stackoverflow.com/a/30407011/3705478
Otherwise, if I login using MySQL -u root, I don't see my databases. I see only
information_schema |
| mysql
2) How can I set proper privileges to user + localhost now and remove skip-grant-tables
?