当前位置:   article > 正文

Mysql报错:1130-host ... is not allowed to connect to this MySql server如何处理_1130-host is not allowed to

1130-host is not allowed to

在这里插入图片描述
在这里插入图片描述

具体步骤

1、连接服务器: mysql -u root -p

在这里插入图片描述

2、查看当前所有数据库:show databases;

在这里插入图片描述

3、进入mysql数据库:use mysql;

在这里插入图片描述

4、查看mysql数据库中所有的表:show tables;

在这里插入图片描述

5、查看user表中的数据:select Host, User,Password from user;

在这里插入图片描述

6、修改user表中的Host:update user set Host=‘%’ where User=‘root’;

在这里插入图片描述

PS:如果出现报错,忽略即可:ERROR 1130: Host ‘192.168.10.173’ is not allowed to connect to this MySQL ERROR 1062 (23000): Duplicate entry ‘%-root’ for key ‘PRIMARY’ 忽略即可

7、最后刷新一下即可:flush privileges;

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/煮酒与君饮/article/detail/792437
推荐阅读
相关标签
  

闽ICP备14008679号