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

建立用戶:
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.
---------------------
做者:rick-he
來源:CSDN
原文:https://blog.csdn.net/u011575570/article/details/51438841
版權聲明:本文爲博主原創文章,轉載請附上博文連接!mysql

相關文章
相關標籤/搜索