mysql提示got timeout reading communication packets的解决方法
错误提示:
user: 'root' host: `localhost' (Got timeout reading communication packets)
MYSQL server has gone away
引起这个原因是不可怕的.原因是更改了系统的断开时间.
mysql>show gloable variables like "%timeout%";
进行查看
interactive_timeout 的黓认值为28800
wait_timeout 的默认值这:120
根据情况增加吧.
这两个值是一个全局变量,可以动态增加,如:
mysql> set global interactive_timeout=28800;
Query OK, 0 rows affected (0.00 sec)
mysql> show global variables like "interactive_timeout";
+---------------------+-------+
| Variable_name | Value |
+---------------------+-------+
| interactive_timeout | 28800 |
+---------------------+-------+
1 row in set (0.00 sec)
可以导致Got timeout reading communication packets错误的原因
https://dev.mysql.com/doc/refman/5.5/en/communication-errors.html
可能导致Got Timeout reading communication packets错误的原因有如下几个:
A client attempts to access a database but has no privileges for it.(没有权限)
A client uses an incorrect password.(密码错误)
A connection packet does not contain the right information.(连接没有包含正确信息)
It takes more than connect_timeout seconds to obtain a connect packet. (获取连接信息起过connect_timeout的时长)
The client program did not call mysql_close() before exiting.(客户端没有调用mysql_close()函数)
The client had been sleeping more than wait_timeout or interactive_timeout seconds without issuing any requests to the server. (客户端的空连接时间过长,超过了wait_timeout和interactive_timeout的时间)
The client program ended abruptly in the middle of a data transfer.(数据传输过程中终结)
错误排查:
因为我们手机版与pc端的php函数不同步导致的问题,所以仔细检查一下问题就解决了。
- Got timeout reading communication packets解决方法
- MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
- mysql5.7.17日志时间戳(log_timestmaps)与系统时间不一致问题以及日志报Got an error reading communication packets情况分析
- MySQL:reading initial communication packet问题解决方法
- MySQL ERROR Got an error reading communication packets
- mysql执行update提示ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction的应急解决方法
- mysql5.7日志时间戳(log_timestmaps)与系统时间不一致问题以及日志报Got an error reading communication packets情况分析
- Aborted connection 1055898 to db: 'xxx' user: 'yyy' host: 'xxx.xxx.xxx.xxx' (Got timeout reading communication packets)
- MYSQL Got an error reading communication packets错误
- MySQL:reading initial communication packet问题解决方法
- 可以导致Got timeout reading communication packets错误的原因
- Mysql 连接提示 Client does not support authentication protocol requested by server; consider upgrading MySQL client 解决方法
- windows mysql 中文乱码和中文录入提示太大错误的解决方法
- 编译mysql提示错误:configure: error: No curses/termcap library found 解决方法
- 解决lost connection to mysql server at reading initial communication packet
- windows XP中,mysql连接时提示:1045 access denied for user 'root'@'localhost' using password yes 的解决方法
- php提示Warning:mysql_fetch_array() expects的解决方法
- mysql常见错误提示及解决方法
- mysql启动提示mysql.host 不存在,启动失败的解决方法
- mysql建库时提示Specified key was too long max key length is 1000 bytes的问题的解决方法