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
随机推荐
- tomcat启动时加载配置文件 报错
原因: @serice("customerService") 和@Repository(value="customerDao") 解决: 直接@ ...
- rest-framework组件 之 解析器
解析器 request类 django的request类和rest-framework的request类的源码解析 局部视图 from rest_framework.parsers import JS ...
- Netty的Channel
Channel是一个网络端口连接,或者是可以进行读,写,链接,绑定端口的组件的连接. Channel就是一个链接,它提供了如下的功能. 1:获取当前链接的状态 2:配置当前链接参数 3:进行read ...
- STL-- vector中resize()和reserve()区别
最近写了一个小型的STL--TinySTL.发现有一些基础的东西需要记录下来,所以我打算多写一些东西,方便以后查看. 先看看<C++ Primer>中对resize()函数两种用法的介绍: ...
- 【monkey测试】Fragment not attached to Activity
monkey测试跑出了一个异常: // CRASH: packgeName (pid) // Short Msg: java.lang.IllegalStateException // Long Ms ...
- DROOLS相关资料
这个地址可以教你如何配置drools的workbench http://blog.csdn.net/u012373815/article/details/53526287 这篇文章教你如何搭建一个简单 ...
- 乱谈zip、rar文件格式
作者:马健邮箱:stronghorse_mj@hotmail.com发布:2006.11.21最近更新:2006.11.25 目录一.目录表(TOC)与分卷(Volume)二.固实(solid)压缩方 ...
- C#封装的VSTO Excel操作类
自己在用的Excel操作类,因为经常在工作中要操作Excel文件,可是使用vba实现起来实在是不方便,而且编写也很困难,拼接一个字符串都看的眼花. 这个时候C#出现了,发现使用C#来操作Excel非常 ...
- ubuntu - 14.04,配置GOPATH(GO语言开发代码存放目录)
一,创建GOPATH:选择一个目录或者在我们想要的地方创建一个作为GOPATH的目录,我的GOPATH是:“/home/sunylat/gopath”. 二,配置系统变量:在shell里面输入“sud ...
- poj3167(kmp)
题目链接: http://poj.org/problem?id=3167 题意: 给出两串数字 s1, s2, 求主串 s1 中的 s2 匹配数并输出每个匹配的开头位置. 区间 [l, r] 是 s2 ...