centos mysql 大量数据导入时1153 错误:1153 - Got a packet bigger than 'max_allowed_packet' bytes
参考:http://stackoverflow.com/questions/93128/mysql-error-1153-got-a-packet-bigger-than-max-allowed-packet-bytes
用脚本写测试数据,在ubuntu上ok,没想到到centos报1153错误。解决方法:
登入mysql,执行:
set global net_buffer_length=1000000; set global max_allowed_packet=1000000000;
就ok了。
如果是sql脚本则可以用下列命令导入
mysql --max_allowed_packet=100M -u root -p database < 大量数据的insert等.sql