mysql-建立用戶報錯ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'

建立用戶:
create user ‘test’@’%’ identified by ‘test’;
顯示ERROR 1396 (HY000): Operation CREATE USER failed for ‘test’@’%’
查看是否是存在這個用戶
select user from user;
發現沒有這個用戶。
記得上次有刪除過這個用戶。可能沒有刷新權限
flush privileges;
以後仍是不行報錯ERROR 1396 (HY000): Operation CREATE USER failed for ‘test’@’%’
沒辦法再刪除一次:
drop user ‘test’@’%’;
flush privileges;
以後create user ‘test’@’%’ identified by ‘test’;
成功。
網上找了下緣由:
Assume the user is there, so drop the user
After deleting the user, there is need to flush the mysql privileges
Now create the user.mysql

相關文章
相關標籤/搜索