MySQL: "UPDATE command denied to user ''@'localhost'"

Posted by Uncle Nerdicus on Server Fault See other posts from Server Fault or by Uncle Nerdicus
Published on 2013-11-09T21:50:30Z Indexed on 2013/11/09 21:55 UTC
Read the original article Hit count: 331

Filed under:
|
|

For some reason when I installed MySQL on my machine (a Mac running OS X 10.9) the 'root' MySQL account got messed up and I don't have access to it, but I do have access to the standard MySQL account 'sean@localhost' which I use to log into phpMyAdmin.

I am trying to reset the 'root' password by starting the mysqld daemon using the command mysqld --skip-grant-tables and then running the following lines in the mysql> shell.

mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass')

-> WHERE User='root';

mysql> FLUSH PRIVILEGES;

Problem is when I try to run that MySQL string the daemon spits back a ERROR 1142 (42000): UPDATE command denied to user ''@'localhost' for table 'user' as if I didn't use the -u argument when I started the mysql shell, either though I did.

Any help is muchly appreciated as I am lost at this point. :/

© Server Fault or respective owner

Related posts about mysql

Related posts about macosx