252010

The default maximum allowed packget size is 1MB, so if you store some large binaries in your database you might get some problems. All you need to do is re-set the maximum size to a larger number.

Macintosh:trunk jennyfong$ mysql -uroot database_name < database_backup.sql

ERROR 1153 (08S01) at line 2365: Got a packet bigger than 'max_allowed_packet' bytes
Macintosh:trunk jennyfong$ mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 25
Server version: 5.0.86 MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> set global net_buffer_length=10000000;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> set global max_allowed_packet=1000000000;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
Macintosh:trunk jennyfong$ mysql -uroot database_name < database_backup.sql

show variables like 'max_allowed_packet';

Posted by admin Tagged with: