mysql 数据还原时,备份的SQL脚本文件过大导致的错误,解决办法!
查看MySQL数据库的max_allowed_packet
例如:
SHOW VARIABLES LIKE 'max_allowed_packet';
修改max_allowed_packet,包或任何生成的/中间字符串的最大大小;
SET GLOBAL max_allowed_packet=600*1024*1024;
例如:
SHOW VARIABLES LIKE 'max_allowed_packet';
SET GLOBAL max_allowed_packet=600*1024*1024;