开发者

Mysql连接本地报错:1130-host ... is not allowed to connect to this MySQL server解决

开发者 https://www.devze.com 2023-03-16 09:04 出处:网络 作者: 永不消逝的黑眼圈
右击开始图标,打开&ldqwww.devze.comuo;命令提示符(管理员)”。 1、输入代码,停止服务。 

右击开始图标,打开&ldqwww.devze.comuo;命令提示符(管理员)”。

1、输入代码,停止服务。 

net stop MySQ编程客栈L57    // 我的mysql是57版本的

2、转到mysq编程l的bin目录下。

3、输入代码,启动mysql 跳过权限。

mysqld --skip-grad开发者_PostgreSQLVwKSuont-tables
//执行到这里就只会有光标在一闪一闪无法继续写命令或输入任何命令,故重新再打开一个cmd窗口

Mysql连接本地报错:1130-host ... is not allowed to connect to this MySQL server解决

4、再打开一个CMD,再次转到mysql的根目录下

Mysql连接本地报错:1130-host ... is not allowed to connect to this MySQL server解决

 5、输入代码,进入mysql。

mysql
javascript

 6、输入代码,刷新数据库。

flush privileges;

Mysql连接本地报错:1130-host ... is not allowed to connect to this MySQL server解决

 7、输入代码,使用mysql数据库。

use mysql
//可以看到user表

Mysql连接本地报错:1130-host ... is not allowed to connect to this MySQL server解决

 8、输入代码,查看本地用户。

select Host,User,authentication_string from user;

Mysql连接本地报错:1130-host ... is not allowed to connect to this MySQL server解决

9、输入代码把root用户的Host修改为%。

update user set host = '%' where user ='root';

Mysql连接本地报错:1130-host ... is not allowed to connect to this MySQL server解决

 10、返回mysql连接页面,登录成功。

Mysql连接本地报错:1130-host ... is not allowed to connect to this MySQL server解决

总结

到此这篇关于Mysql连接本地报错:1130-host ... is not allowed to connect to this MySQL server解决的文章就介绍到这了,更多相关Mysql连接本地报错1130-host内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

0

精彩评论

暂无评论...
验证码 换一张
取 消