mysql导入sql文件报错 ERROR 2013 2006 2002
今天导入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 s
今天导入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文件报错Error: Unknown storage engine‘InnoDB’的解决方法
-
mysql执行sql文件报错Error: Unknown storage engine‘InnoDB’的解决方法
-
Docker MySQL导入.sql文件(官方Sakila示例库),解决Failed to open file xxx.sql, error: 2
-
【mysql案例】导入报错-ERROR 2013 (HY000)
-
【mysql案例】导入报错-ERROR 2013 (HY000)
-
mysql导入sql文件报错 ERROR 2013 2006 2002
-
mysql导入sql文件报错 ERROR 2013 2006 2002
-
mysql执行sql文件报错Error: Unknown storage engine‘InnoDB如何解决
-
mysql执行sql文件报错Error: Unknown storage engine‘InnoDB如何解决