沃梦达 / 编程技术 / 数据库 / 正文

ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'解决方法

ERROR 1130: Host 192.168.10.173 is not allowed to connect to this MySQL ERROR 1062 (23000): Duplicate entry %-root for key PRIMARY mysql -u root -p--输入密码use mysql;mysql select host, user from user; 将相应用户数据表中的host字段改成%; update user set host='%' where user=

ERROR 1130: Host '192.168.10.173' is not allowed to connect to this MySQL ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
mysql -u root -p
-->输入密码
use mysql;
mysql> select host, user from user;
将相应用户数据表中的host字段改成'%';
update user set host='%' where user='root';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY' 不予理会
flush privileges;
重新远程连接OK

本文标题为:ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'解决方法

基础教程推荐