创建用户:
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.
原文:https://www.cnblogs.com/zhjh256/p/11613018.html
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ji-chu/98510.html