mysql报错Lost connection to MySQL server at 'reading initial communication packet'
时间:2016-01-03 01:25 来源:linux.it.net.cn 作者:IT
【问题描述】:
mysql远程连接报错:Lost connection to MySQL server at 'reading initial communication packet'
【解决办法】:
1、检查是否有防火墙限制
2、检查mysql是否有访问权限
【远程授权】:
use mysql; Grant all privileges on *.* to 'root'@'%' identified by 'kdm001' with grant option;
flush privileges;
3、检查my.ini文件里是否设置了bind-address 参数,如果有将该条注释掉即可。
4、
(1)在my.ini中添加skip-name-resolve
vi /etc/my.cnf
[mysqld] 段加skip-name-resolve
(2)修改hosts.allow
vi /etc/hosts.allow
加mysqld : ALL : ALLOW
mysqld-max : ALL :ALLOW
(责任编辑:IT)
【问题描述】: mysql远程连接报错:Lost connection to MySQL server at 'reading initial communication packet' 【解决办法】: 1、检查是否有防火墙限制 2、检查mysql是否有访问权限 【远程授权】: use mysql; Grant all privileges on *.* to 'root'@'%' identified by 'kdm001' with grant option; flush privileges; 3、检查my.ini文件里是否设置了bind-address 参数,如果有将该条注释掉即可。 4、 (1)在my.ini中添加skip-name-resolve vi /etc/my.cnf [mysqld] 段加skip-name-resolve (2)修改hosts.allow vi /etc/hosts.allow 加mysqld : ALL : ALLOW mysqld-max : ALL :ALLOW (责任编辑:IT) |