错误提示:
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 thanconnect_timeoutseconds to obtain a connect packet. (获取连接信息起过connect_timeout的时长)

The client program did not callmysql_close()before exiting.(客户端没有调用mysql_close()函数)

The client had been sleeping more thanwait_timeoutorinteractive_timeoutseconds 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函数不同步导致的问题,所以仔细检查一下问题就解决了。

更多相关文章

  1. Android(安卓)触摸提示音
  2. Android开发——Android搜索框架(二)
  3. android插件汇总
  4. android中HttpURLConnection调用getResponseCode()时崩溃 解决方
  5. Android空引用问题的解决方法——on a null object reference
  6. Android原生弹框的工具类AlertDialog,Dialog
  7. android读取assets大于1M文件的解决方法
  8. Android弹出式提示框 PopupWindow
  9. 几个Android小错误解决方法

随机推荐

  1. Android(安卓)源码解析 - ScrollView
  2. android的init实例
  3. Android 原生页面同H5交互
  4. Android使用LocalSocket抓取数据
  5. 【Android UI】Android颜色系大全
  6. 图解IntelliJ IDEA 13版本对Android SQLi
  7. Android(安卓)使用 AIDL 实现进程间通信,
  8. Android漫游记(1)---内存映射镜像(memory
  9. Android(安卓)Dialog 全屏
  10. Android基本框架笔记