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连接...成功!!
![clipboard.png](http://upload-images.jianshu.io/upload_images/5317394-9fd6f3d6f81dab33.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
clipboard.png