首页 > 代码库 > mysql 导入sql 报错 2013 2006

mysql 导入sql 报错 2013 2006

今天导入sql总是提示错误
ERROR 2013 (HY000): Lost connection to MySQL server during query
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (111)
ERROR:
Can‘t connect to the server

网上试了很久,各种修改my.cnf,最后发现有人说是insert语句一次插入太多行造成的,解决办法就是每次insert一行

用mysqldump导出 加上参数--skip-extended-insert

不清楚是不是跟mysql版本有关,我的版本是
mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1

mysql 导入sql 报错 2013 2006