ERROR 1153 (08S01) at line 8606: Got a packet bigger than ‘max_allowed_packet’ bytes.

ERROR 1153 (08S01) at line 8606: Got a packet bigger than ‘max_allowed_packet’ bytes.

Date: 22-05-2021

Introduction:

When doing a very large MySQL import from a dump file you may get this error. You can follow the below steps to solve this error.

Step 1: You can see the current configured maximum packet size for your installed mysql service. Log in to your MySQL shell with root privileges. Use below command to get value in MB.
mysql> SELECT @@max_allowed_packet / 1024 / 1024;

In below image has 1MB value you need to change this value to 100MB.

Step 2: Login to the server and edit the /etc/mysql/my.cnf or /etc/my.cnf or my.ini file under the mysqld section and add below detail.
max_allowed_packet=100M

Step 3: Restart the mysql service to apply these settings in server. You can verify this value as changed to 100 MB by using command in Step 1.

Note: You can change the maximum allowed packet size when running the mysql below command as a parameter. This increases the maximum packets value that client will send to the server.
# mysql --max_allowed_packet=100M DBname < Dump file.sql

Thank you!

admin

Our team has expertise across software and web development, WordPress, e-commerce, mobile applications, UI/UX, cloud and infrastructure, DevOps, CI/CD, API integration, security, testing, automation, and technical support. The team also works with AI-based software solutions, LLMs, AI workflows, AI agents, and intelligent application development to help businesses automate processes and build smarter digital solutions. We focus on developing, deploying, maintaining, and optimising secure, scalable, and reliable technology solutions while helping businesses adopt modern technologies and drive digital transformation.

Leave a Reply

Scroll to Top