سؤال

I was trying to create a mysql user with:

$ mysql5 -u root -p
$ [enter password]
$ create user 'name'@'localhost' indentified by '123456';

Then I accidentally deleted the user while using phpMyAdmin.

So I came back to terminal to create the user again with the lines above. Then it gives me an error:

ERROR 1396 (HY000): Operation CREATE USER failed for 'name'@'localhost'

How do I fix this? I need to create the user with the same name and password.

Thanks in advance,

Milo

هل كانت مفيدة؟

المحلول

It's very hard to see the issue here without some testing, but you may want to try:

flush privileges;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top