I was trying to give remote access to MySQL, as MySQL was only working locally.
I followed this guide
http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
I used command like this from tutorial:
mysql> update user set Host='202.54.10.20' where user='root';
I think this messed up the local mysql.
Now I cannot login with:
$ mysql -u root -p
i get this error:
Access denied for user 'root'@'localhost' (using password: Yes)
Now I know the password is right, as it used to work before. but I accidentally locked myself out..
I don't know what to do anymore.
The os used by the server is Ubuntu.
Best Answer
You can try the regular recovery procedure:
Run the service using:
Connect (password won't be required):
Revert your changes (be careful this time and check with
select
what is the current state, host should be202.54.10.20
):Restart MySQL the regular way