Wednesday, August 1, 2012

MYSQL: Drop user from mysql.user and mysql.db, then Flush privileges, before you can add the same user again.


http://www.devissues.com/mysql-error-1396-hy000-operation-create-user-failed


mysql> drop user userguy;
ERROR 1396 (HY000): Operation DROP USER failed for 'userguy'@'%'
That didn’t work either. Instead I did this:
delete from mysql.user where User = 'userguy';
delete from mysql.db where User = 'userguy';


And when I tried to create the user again I was still met with ERROR 1396.

HOW TO SOLVE MYSQL ERROR 1396 (HY000): OPERATION CREATE USER FAILED

Once those user entries are removed from the User and db tables, you just have to flush privileges:
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Now when you enter your CREATE USER command (with the correct syntax and a valid single line password), it should succeed.
And stop working when you are tired!

#########################################################


http://cournape.wordpress.com/2010/08/30/fixing-error-1396-hy000-operation-create-user-failed/

  • delete from mysql.user where user=foo;
  • delete from mysql.db where user=foo

http://stackoverflow.com/questions/5555328/error-1396-hy000-operation-create-user-failed-for-jacklocalhost
Try doing a FLUSH PRIVILEGESThis MySQL bug post on that error code appears to report some success in a case similar to yours after flushing privs.

http://bugs.mysql.com/bug.php?id=28331
Unclear error message when CREATE USER fails due to duplicate key


mysql error 1396 - Google Search







No comments:

Post a Comment