Chinaunix首页 | 论坛 | 博客
  • 博客访问: 370909
  • 博文数量: 150
  • 博客积分: 3423
  • 博客等级: 中校
  • 技术积分: 1005
  • 用 户 组: 普通用户
  • 注册时间: 2011-07-15 09:04
文章分类

全部博文(150)

文章存档

2012年(2)

2011年(148)

分类: Mysql/postgreSQL

2011-08-14 17:42:11

“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.执行命令:
  1. set global max_allowed_packet=1000000000;
  2. set global net_buffer_length=1000000;
  3. FLUSH PRIVILEGES;

        
阅读(4644) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~