美文网首页
ERROR 1062 (23000): Duplicate en

ERROR 1062 (23000): Duplicate en

作者: 逗逼熊本熊 | 来源:发表于2017-08-07 00:02 被阅读0次

MySQL> update user set host='%' where user = 'root';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
然后查看了下数据库的host信息如下:
MySQL> select host from user where user = 'root';
+-----------------------+
| host |
+-----------------------+
| % |
| 127.0.0.1 |
| localhost.localdomain |
+-----------------------+
3 rows in set (0.00 sec)
host已经有了%这个值,所以直接运行命令:
复制代码 代码如下:

MySQL>flush privileges;

再用MySQL administrator连接...成功!!

相关文章

网友评论

      本文标题:ERROR 1062 (23000): Duplicate en

      本文链接:https://www.haomeiwen.com/subject/udxolxtx.html