1.大多数时候设置"set global connect_timeout=60;"是可以解决问题的。

我们可以通过执行“SHOWSTATUS LIKE 'aborted%'”,可以观察到 Variable_name Value

Aborted_clients 6 
Aborted_connects 15010

觉得是否要增加connect_timeout的时间,"Aborted_connects"将会随着服务端放弃客户端初始连接而增加。如果"Aborted_connects"很大,并且不断增加,就需要增加"connect_timeout".

2.在MySQL的配置文件中[mysqld]添加"skip-name-resolve",减少域名解析的时间
3.部署服务器端的网络要好,至少大于100Mbps/s
4.如果是在调用mysql_query的时候出现的问题,那就需要把"net_read_timeout"的时间调成30秒,或者60秒,或者更大的值
5.如果还不能解决问题,那估计是你的SQL语句中含有BLOB这种大类型,我们就需要增加"max_allowed_packet"的值了

Lost connection to MySQL server at 'reading authorization packet', system error: 0_Mysql的更多相关文章

  1. ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0

    最近遇到一个MySQL连接的问题,远程连接MySQL时遇到"ERROR 2013 (HY000): Lost connection to MySQL server at 'reading a ...

  2. 连接 MySQL 报错:Lost connection to MySQL server at 'reading authorization packet', system error: 34

    报错信息: Lost connection to MySQL server at 解决方案: use mysql; ; flush privileges; 参考: https://blog.csdn. ...

  3. MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0

    最近远程连接mysql总是提示 Lost connection 很明显这是连接初始化阶段就丢失了连接的错误 其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配 ...

  4. 虚拟机中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 ...

  5. 快速解决mysql Lost connection to MySQL server at 'reading initial communication packet及can't connect to mysql server on 'localhost'

    今天在使用Navicat连一个远程mysql时,总是提示连接不成功,提示Lost connection to MySQL server at 'reading initial communicatio ...

  6. 解决Lost connection to MySQL server at 'reading initial communication packet', 的方法

    今天用heidsql连接mysql时出了问题,提示:Lost connection to MySQL server at 'reading initial communication packet 网 ...

  7. Lost connection to MySQL server at 'reading initial communication packet' 错误解决

    Lost connection to MySQL server at 'reading initial communication packet' 错误解决 上次解决了这个问题,今天又碰到,突然失忆, ...

  8. 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 ...

  9. navicat远程连接阿里云ECS上的MYSQL报Lost connection to MySQL server at 'reading initial communication packet'

    问题现象 MySQL 远程连接报错:Lost connection to MySQL server at 'reading initial communication packet' 解决方案 1.检 ...

随机推荐

  1. HDU 5446 Unknown Treasure

    Unknown Treasure Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Other ...

  2. 清北学堂模拟赛d2t1 一道图论神题(god)

    题目描述 LYK有一张无向图G={V,E},这张无向图有n个点m条边组成.并且这是一张带权图,只有点权. LYK想把这个图删干净,它的方法是这样的.每次选择一个点,将它删掉,但删这个点是需要代价的.假 ...

  3. hdu 4707 bellman

    最短路的优先队列做法: #include<stdio.h> #include<queue> #include<string.h> #define N  100010 ...

  4. 【DEBUG】不能将参数 1 从“CString”转换为“const char *”

    1.  在vc6.0下用CString str;num = atoi(str);就可以顺利取到num: 但是同样代码拿到vs2008就报错,error C2664: "atoi": ...

  5. linux系统读写缓存

    1.  操作系统缓存 在linux世界里,一切可读写设备都可看作是文件.文件cache设计的好坏直接影响着文件系统和磁盘的性能.最直观的是使用free命令看到的cached列. 这里面的cached列 ...

  6. HDU 4363

    这题是记忆化搜索很容易想到,但状态却不好设 dp[i][j][u][d][l][r][k].对于矩形为i*j,它的四周的颜色分别为u,d,l,r,横竖切的状态为k的种数. 其中要注意一个问题是,停止不 ...

  7. [PWA] Show Notifications when a Service Worker is Installed or Updated

    Service Workers get installed and activated in the background, but until we reload the page they don ...

  8. Bitcask存储模型

    ----<大规模分布式存储系统:原理解析与架构实战>读书笔记 近期一直在分析OceanBase的源代码,恰巧碰到了OceanBase的核心开发人员的新作<大规模分布式存储系统:原理解 ...

  9. 创建hive整合hbase的表总结

    [Author]: kwu 创建hive整合hbase的表总结.例如以下两种方式: 1.创建hive表的同步创建hbase的表 CREATE TABLE stage.hbase_news_compan ...

  10. C语言指针实现字符串的反转

    题目要求: 编敲代码:从键盘随意输入一个字符串,输出该字符串. 然后.将该字符串逆序存放后再输出,要求用字符指针完毕. 代码: //解法一 #include <stdio.h> #incl ...