MySQL导入sql脚本错误:2006 – MySQL server has gone away
到如一些小脚本很少报错,但最近导入一个10+M的SQL脚本,却重复报错:
Error occured at:2014-03-24 11:42:24
Line no.:85
Error Code: 2006 - MySQL server has gone away
最终找到原因,原来是MySQL导入大批量数据的时候超出了默认允许最大的数据包所以就提示2006 – MySQL server has gone away
于是找到my.cnf,在[mysqld]加入:
max_allowed_pa