user3086014 user3086014 - 26 days ago 11
MySQL Question

ERROR 1396 (HY000): Operation DROP USER failed for 'user'@'localhost'

I have created a user in mysql. Now i want to delete the user ? How to do that? I am getting this error :

ERROR 1396 (HY000): Operation DROP USER failed for 'user'@'localhost'


I am using this command :

DROP USER 'user'@'localhost';


Its an amazon machine.

Thanks

Answer

It was because i created the user using command :

CREATE USER 'user'@'%' IDENTIFIED BY 'passwd';

and i was deleting it using :

drop user 'user'@'localhost';

and i should have used this command :

drop user 'user'@'%';
Comments