MariaDB [(none)]> drop user cr; ERROR 1396 (HY000): Operation DROP USER failed for 'cr'@'%'

  • 首先查看mysql.user表中是否存在该用户


  • 如果存在,更新权限
MariaDB [(none)]> flush privileges;
  • 重新执行删除操作(注意删除的时候要写全称)
MariaDB [(none)]> drop user 'cr'@'localhost';
  • 查看用户表
MariaDB [(none)]> SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;

posted @ 2018-07-04 09:09  crr121  阅读(615)  评论(0编辑  收藏  举报