【现象】 导入MySQL的mysqldump文件时报错,提示ERROR 2013 (HY000) at line xxoo: Lost connection to MySQL serverduring query,导入操作中断退出。 【原因】 要导入的mysqldump文件中insert的values太多,超过了MySQL参数max_allowed_packet的,进而导致
【现象】
导入MySQL的mysqldump文件时报错,提示ERROR 2013 (HY000) at line xxoo: Lost connection to MySQL serverduring query,导入操作中断退出。
【原因】
要导入的mysqldump文件中insert的values值太多,超过了MySQL参数max_allowed_packet的值,进而导致导入操作中断退出。
【解决方法】
调高max_allowed_packet的值:
SQL> set global max_allowed_packet=67108864;
【参考资料】
max_allowed_packet值的范围是1024 ..1073741824,单位是字节。
The packet message buffer is initialized tonet_buffer_length bytes, but can grow up to max_allowed_packet bytes whenneeded. This value by default is small, to catch large (possibly incorrect)packets.
You must increase this value if you areusing large BLOB columnsor lon