错误解决办法:2006:MySQL server has gone away

   早上来公司,看昨天运行的情况: 

2006:MySQL server has gone away

  嗯?又是这个错误?为什么要又呢?因为遇到过几次了。

  网上一查,先登录mysql:

mysql> show global status like 'uptime';

+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| Uptime        | 268306 |
+---------------+--------+
1 row in set (0.01 sec)

   接着再看:

mysql> show global variables like '%timeout';
+-----------------------------+----------+
| Variable_name               | Value    |
+-----------------------------+----------+
| connect_timeout             | 10       |
| delayed_insert_timeout      | 300      |
| have_statement_timeout      | YES      |
| innodb_flush_log_at_timeout | 1        |
| innodb_lock_wait_timeout    | 50       |
| innodb_rollback_on_timeout  | OFF      |
| interactive_timeout         | 28800    |
| lock_wait_timeout           | 31536000 |
| net_read_timeout            | 30       |
| net_write_timeout           | 60       |
| rpl_stop_slave_timeout      | 31536000 |
| slave_net_timeout           | 60       |
| wait_timeout                | 28800    |
+-----------------------------+----------+
13 rows in set (0.00 sec)

  再看

mysql> show global status like 'Com_kill';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_kill      | 0     |
+---------------+-------+
1 row in set (0.01 sec)

   再看:

mysql> show global variables like 'max_allowed_packet';
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16777216 |
+--------------------+----------+
1 row in set (0.01 sec)

猜你喜欢

转载自blog.csdn.net/quantum7/article/details/85377183