文章内容
2018/1/16 16:55:19,作 者: 黄兵
ERROR 1396 (HY000): Operation DROP USER failed for 'user'@'localhost'
我在华为云服务器上面的mysql中创建了一个用户。现在我想删除用户?怎么做?我得到这个错误:
ERROR 1396 (HY000): Operation DROP USER failed for 'user'@'localhost'我正在使用这个命令:
DROP USER 'user'@'localhost';解决方案:
您尝试删除的用户可能不存在。您可以通过运行确认(或不是)这种情况:
select user,host
from mysql.user
where user = '<your-user>';如果用户确实存在,则尝试运行:
flush privileges;
drop user 'user'@'localhost';另一件要检查的是确保您以root用户身份登录
如果一切都失败了,那么你可以像这样手动删除用户:
delete from mysql.user
where user='<your-user>'
and host = 'localhost';
flush privileges;参考资料:ERROR 1396 (HY000): Operation DROP USER failed for 'user'@'localhost'
评论列表