mysql远程连接问题 Lost connection to MySQL server at ‘reading initial communication packet', system error: 0
在用Navicat for MySQL远程连接mysql的时候,出现了
Lost connection to MySQL server at ‘reading initial communication packet', system error: 0
好恶心,服务器重启了一次,就一上午都是在处理mysql的各种问题。
试了两种方法都不生效:
修改my.cnf文件(windows为my.ini)
一般在mysql的安装目录,/etc/mycnf。
在my.cnf配置文件中的[mysqld]区域添加skip-name-resolve,看网友说的是跳过mysql连接的DNS反向解析功能,这样能很好地提高mysql性能。在这种情况下,就只能使用MySQL授权表中的IP来连接mysql服务了。
但是不生效。附上my.cnf配置的几个参数:
skip-name-resolve 跳过DNS反向解析过程.(这样就不能使用主机名连接mysql了,只能使用ip连接)
skip-grant-tables 跳过授权表(当mysql登陆密码忘记时的解决办法)
skip-networking 跳过TCP/IP连接
skip-host-cache 禁用主机名缓存;要想清除主机名缓存,执行FLUSH HOSTS语句或执行mysqladmin flush-hosts命令
把client的ip写在mysql服务器的/etc/hosts文件里,随便给个名字做主机映射即可。
因为工作环境需要在多个地址访问mysql,一直维护hosts文件也不现实,所以被淘汰。。。
最后发现。。。。。。
远程访问mysql都可以,就是本地访问不了,也就是说可以照常在生产环境跑。真恶心
mysql远程连接问题 Lost connection to MySQL server at ‘reading initial communication packet', system error: 0的更多相关文章
- MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
最近远程连接mysql总是提示 Lost connection 很明显这是连接初始化阶段就丢失了连接的错误 其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配 ...
- Lost connection to MySQL server at ‘reading initial communication packet', system error: 0 mysql远程连接问题
在用Navicat for MySQL远程连接mysql的时候,出现了 Lost connection to MySQL server at ‘reading initial communicatio ...
- 虚拟机中MySQL连接问题:Lost connection to MySQL server at 'reading initial communication packet, system error: 0 以及 host is not allowed to connect mysql
环境:在VirtualBox中安装了Ubuntu虚拟机,网络使用了NAT模式,开启了端口转发. 局域网内其他计算机访问虚拟机中的MySQL Server出现两个问题: Lost connection ...
- Mysql Lost connection to MySQL server at ‘reading initial communication packet', system error: 0
在用Navicat for MySQL远程连接mysql的时候,出现了 Lost connection to MySQL server at ‘reading initial communicatio ...
- mysql登陆时出现ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
有4到5天没开mysql,这天晚上打=打开phpstudy,想进去mysql练习练习,结果丢给我这个 ERROR 2013 (HY000): Lost connection to MySQL serv ...
- navicat 出现 mysql远程连接问题 Lost connection to MySQL server at ‘reading initial communication packet', system error: 0
今天做服务器上的东西需要看数据库时,突然发现有这个报错,然后自己也查了很多资料 我最后找到一个在my,cnf配置文件中mysqld下加入一条 max_allowed_packet = 500M 也就是 ...
- mysql远程连接错误提醒:2013-Lost connection to MySQL server at ‘reading initial communication packet', system error: 0
因为没有匹配/etc/hosts.allow. 解决方法: 1.在hosts.allow 文件中添加 mysqld:ALL [root@ucDB204 ~]# cat /etc/hosts.allow ...
- Lost connection to MySQL server at 'reading initial communication packet', system error: 0的一个解决方案
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT在icmp之前/etc/init.d/iptables restar ...
- lost connection to mysql server at "reading initial communication packet",system error:2
随机推荐
- hibernate里的实体类中不能重写toString
@Test报堆栈溢出, 在main中报错toString
- 机器人自主移动的秘密:SLAM与路径规划有什么关系?(三)
博客转载自:https://www.leiphone.com/news/201612/lvDXqY82OGNqEiyl.html 雷锋网(公众号:雷锋网)按:本文作者SLAMTEC(思岚科技公号sla ...
- 函数的返回值是如何带出和接收的以及内存中的活动情况.RP
函数返回值时,要生成一个值的副本. 而用引用返回值时,不生成值的副本. 例如,下面的程序是有关引用返回的4种形式: //********************* //** ch9_6.cpp ** ...
- scala的object知识点
1:object的中的代码,会在object对象被调用的时候执行且只会执行一次 object Demo{ println("gaoxing") def name = "n ...
- 浅谈android代码保护技术_ 加固
浅谈android代码保护技术_加固 导语 我们知道Android中的反编译工作越来越让人操作熟练,我们辛苦的开发出一个apk,结果被人反编译了,那心情真心不舒服.虽然我们混淆,做到native层,但 ...
- PyTorch入门教程
https://www.zhihu.com/question/55720139 Deep Learning with PyTorch: A 60 Minute Blitz Author: Soumit ...
- 使用JMeter的Java Sampler轻松定制自己的benchmark
做性能测试,接口测试,非常好 转自 http://www.iteye.com/topic/1123432 以前碰到更多的是WEB APP的性能测试,也许用得最多的是Loadrunner, Web S ...
- 2017年第八届蓝桥杯省赛试题(JavaA组)
1.结果填空 (满分5分)2.结果填空 (满分11分)3.结果填空 (满分13分)4.结果填空 (满分17分)5.代码填空 (满分7分)6.代码填空 (满分9分)7.程序设计(满分19分)8.程序设计 ...
- github基本命令
https://github.com/explore 使用github网站搜索资源 具体搜索 Git教程 - 廖雪峰的官方网站 一. git配置命令 1.设置用户名 git config --glob ...
- Winform 数据库连接配置界面
一.添加引用 C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Microsoft.Data.ConnectionUI.Dial ...