“ERROR 1153: Got a packet bigger than 'max_allowed_packet' bytes“
I had the same problem, with an 8gb .sql file. I didn't have any luck
with --max_allowed_packet;
it seems like it didn't do anything. I just
opened two terminals, connected to mysql on one,
set the following:
set global max_allowed_packet=1000000000;
set global net_buffer_length=1000000;
and then ran:
mysql -p < sqldump.sql
from the other terminal.
解释:
1.在终端中使用MySQL的root用户登录MySQL;
2.执行命令:
- set global max_allowed_packet=1000000000;
-
set global net_buffer_length=1000000;
-
FLUSH PRIVILEGES;
阅读(4656) | 评论(0) | 转发(0) |