While importing some data into a local MySQL database we got an error:
[wpfmb type=’error’ theme=2]mysql evince142_tiwi1 < backup.sql
ERROR 1153 (08S01) at line 1868: Got a packet bigger than ‘max_allowed_packet’ bytes[/wpfmb]
This error is basically occurs when a MySQL client or the server receives a packet bigger than max_allowed_packet bytes, it issues a Packet too large error and closes the connection.
To resolve the error:
Login to the sever as root.
Open the file /etc/my.cnf.
Check if you have an entry related to max_allowed_packet.
If it is present you can increase the limit or If it does not you can insert the entry in the file.
vi /etc/my.cnf max_allowed_packet=16M
Save the file and restart the MySQL service.
/etc/init.d/mysql restart
Now while importing the data to the database it would not gave any warning.