mysql> select stg.*,str.storehouse_name from store_goods as stg left join storehouse as str on stg.storehouse_id = str.storehouse_id and stg.goods_id = 1;ERROR 2006 (HY000): MySQL server has gone awayNo connection. Trying to reconnect...Connection id: 10Current database: wms+----------------+----------+---------------+-----------+-----------------+| store_goods_id | goods_id | storehouse_id | goods_sum | storehouse_name |+----------------+----------+---------------+-----------+-----------------+| 1 | 1 | 1 | 20 | yiwu || 2 | 1 | 2 | 60 | hangzhou || 3 | 2 | 1 | 60 | NULL || 4 | 3 | 1 | 30 | NULL || 5 | 3 | 2 | 50 | NULL |+----------------+----------+---------------+-----------+-----------------+5 rows in set (0.01 sec)mysql> select now();ERROR 2006 (HY000): MySQL server has gone awayNo connection. Trying to reconnect...Connection id: 11Current database: wms+---------------------+| now() |+---------------------+| 2020-07-08 23:49:19 |+---------------------+1 row in set (0.01 sec)mysql>
我在my.ini中配置了下时区,定位到[mysqld]所在的位置,在它的下面加上default-time-zone = '+8:00'这一行重启后不再出现这个错误