i was creating a db in mysql and ran commands-
create database projectdb;
create user 'aquaman'@'localhost' identified by password'aquaman123';
and it gave error-
ERROR 1396 (HY000): Operation CREATE USER failed for 'aquaman'@'localhost'
anyone please help me how to resolve it
I ran into this issue having previously deleted a user of the same name directly from the user table:
DELETE FROM mysql.user WHERE User='aquaman';
But this isn't the right way to delete a user! Having dropped the user properly, via:
DROP USER 'aquaman';
...I was once again able to successfully create a user with this name.
Incorrect Syntax!!
You have included an extra password in your code.
Change the code from:
create user 'aquaman'@'localhost' identified by password'aquaman123';
TO:
CREATE USER 'aquaman'@'localhost' IDENTIFIED BY 'aquaman123';
Please check the documentation: http://dev.mysql.com/doc/refman/5.0/en/create-user.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With