Software⏱️ 2 min read📅 2026-05-30

How to Fix Error 1153 Error – MySQL Error 1153 - Got a packet bigger than 'max_allowed_packet' bytes

Increase max_allowed_packet to import MySQL dump

Quick Answer: Edit my.cnf file, set max_allowed_packet to a suitable value (e.g., 32M), and restart MySQL.

To resolve the MySQL Error 1153, you need to increase the max_allowed_packet size to accommodate the large attachments in your database. You can do this by editing the my.cnf file on your local Mac.

🚀 How to Increase Max Allowed Packet Size

  • Open the terminal and navigate to the MySQL installation directory, usually located at /usr/local/mysql.

Method 1: Editing my.cnf

  1. Step 1: Open the my.cnf file in a text editor using the command nano /usr/local/mysql/my.cnf.

Method 2: Using MySQL Configuration Editor

  1. Step 1: Open the MySQL configuration editor using the command mysqladmin ext.

✨ Wrapping Up

After editing the my.cnf file, restart the MySQL service using service mysql restart or sudo systemctl restart mysql to apply the changes. Then, try importing the MySQL dump again.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions