I got bitten by this several times already, here is what usually works if this error happens for user foo
- delete from mysql.user where user=foo;
- delete from mysql.db where user=foo
I got bitten by this several times already, here is what usually works if this error happens for user foo
Thank you! This really helped!
Thank you for posting this.
Elegant in it’s simplicity (not to mention helpful).
Thanks for posting this. I was stumped trying to recreate a user that I’d (incorrectly) deleted and the 2nd line above did the trick. Thanks.
The reason I had the same error was because I was using:
mysql> drop user ‘foo’;
rather than the correct one:
mysql> drop user ‘foo’@”;
where some_ip could be for instances…10.2.34.56
I had previously created my user with:
mysql> create user ‘foo’@’10.2.34.56’ identified by ‘mypassword’;
By the way you need to put the user name foo between apex so ‘foo’ (not foo)
In my case this didn’t fix it since I already had done this but still got the error. However I also had granted some privileges to the user though so maybe that is why. The user still showed up in the information_schema.USER_PRIVILEGES table. In order to fix it I just had to use the DROP USER statement.
The same case for me. I used DROP USER as solution.
i just wrote: drop user foo;
and got success for user foo..
Can someone please tell me what’s wrong with this syntax for SQL Server version: 5.5.22-0ubuntu1 (Ubuntu)
mysql_query(“create table `”.$mysql_table_prefix.”query_log` (
query varchar(255),
time timestamp(14),
elapsed float(2),
results int,
key query_key(query))”);
I ran into this problem too. One thing I did to remedy the problem was enter the “flush privileges” command, which seemed to wipe clean the proverbial slate. Then I did my normal “create user …” command and it worked like a champ.
Awesome, thanks! Worked for me too. I did the first line, but not the second.