mysql远程连接 Host * is not allowed to connect to this MySQL server(第一次配置好lnmp环境)
程序员文章站
2022-03-14 18:34:26
1.第一次在linux上搭建好mysql,本机windows远程链接报错Host * is not allowed to connect to this MySQL server 2.原因:mysql服务器出于安全考虑,默认只允许本地登录数据库服务器。 问题解决:登入mysql后,更改 "mysql ......
1.第一次在linux上搭建好mysql,本机windows远程链接报错Host * is not allowed to connect to this MySQL server
2.原因:mysql服务器出于安全考虑,默认只允许本地登录数据库服务器。
问题解决:登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%",然后重启mysql这样就允许所有的远程机器进行访问了。
步骤1:修改mysql表
mysql -u root -pvmware
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>flush privileges;
mysql>select host, user from user;
mysql>quit
成功!!!!
上一篇: 二进制文件概述
推荐阅读
-
Mysql远程连接 Host * is not allowed to connect to this MySQL server
-
转:mysql远程连接 Host * is not allowed to connect to this MySQL server
-
Mysql远程连接 Host * is not allowed to connect to this MySQL server
-
mysql远程连接 Host * is not allowed to connect to this MySQL server(第一次配置好lnmp环境)
-
转:mysql远程连接 Host * is not allowed to connect to this MySQL server