ERROR 2006 (HY000) at line : MySQL server has gone away
2012-11-12 17:12
543 查看
While using a script to overwrite my local database with the Prod database, I ran into this error:
Opened up the MAMP Pro application and stopped the servers.
Opened File > Edit Template > MySQL my.cnf.
Changed max_allowed_packet = 1M to max_allowed_packet = 64M under [mysqld].
Added wait_timeout = 6000 under [mysqld].
Changed max_allowed_packet = 16M to max_allowed_packet = 64M under [mysqldump].
Saved the template.
Restarted the MAMP Pro servers.
I haven't tested different variations of these updates, so I'm not sure if both wait_timeout and the max_allowed_packet updates were necessary. But after the updates above, the error was gone.
ERROR 2006 (HY000) at line 27652: MySQL server has gone awaySome Google-fu indicated that it was a timeout problem. I found information on fixing it online, but none of it applied to my setup -- I'm running MAMP Pro 2. To work things out on my local installation, I took the following steps:
Opened up the MAMP Pro application and stopped the servers.
Opened File > Edit Template > MySQL my.cnf.
Changed max_allowed_packet = 1M to max_allowed_packet = 64M under [mysqld].
Added wait_timeout = 6000 under [mysqld].
Changed max_allowed_packet = 16M to max_allowed_packet = 64M under [mysqldump].
Saved the template.
Restarted the MAMP Pro servers.
I haven't tested different variations of these updates, so I'm not sure if both wait_timeout and the max_allowed_packet updates were necessary. But after the updates above, the error was gone.
相关文章推荐
- ERROR 2006 (HY000) at line xx: MySQL server has gone away 解决方法
- 数据库导入过大 报错 ERROR 2006 (HY000) at line xx: MySQL server has gone away 解决方法
- MySQL_解决ERROR 2006 (HY000) at line XX MySQL server has gone away问题
- ERROR 2006 (HY000) at line xx: MySQL server has gone away
- ERROR 2006 (HY000) at line xx: MySQL server has gone away 解决方法
- ERROR 2006 (HY000) at line xx: MySQL server has gone away 解决方法
- ERROR 2006 (HY000) at line 1: MySQL server has gone away
- ERROR 2006 (HY000) at line 1: MySQL server has gone away
- 解决ERROR 2006 (HY000) at line XX: MySQL server has gone away问题
- ERROR 2006 (HY000) at line 1: MySQL server has gone away
- mysql error: ERROR 2006 (HY000) at line 149351: MySQL server has gone away
- ERROR 2006 (HY000) at line xx: MySQL server has gone away 解决方法
- ERROR 2006 (HY000) at line xxx: MySQL server has gone away
- ERROR 2006 (HY000) at line 8803: MySQL server has gone away
- [mysq]ERROR 2006 (HY000) at line xx: MySQL server has gone away 解决方法
- ERROR 2006 (HY000) at line xx: MySQL server has gone away 解决方法
- mysqldump备份恢复错误ERROR 2006 (HY000) at line 364: MySQL server has gone away
- ERROR 2006 (HY000): MySQL server has gone away
- MySQL错误 ERROR 2006 (HY000): MySQL server has gone away
- 2012-12-07 19:03 amoeba连接mysql--ERROR 2006 (HY000): MySQL server has gone away