MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes
A single statement or row exceeded max_allowed_packet — big BLOBs, huge INSERTs or large dump lines.
Got a packet bigger than 'max_allowed_packet' bytes Meaning
Both server and client have max_allowed_packet. Imports with extended inserts or large BLOB/TEXT values exceed defaults (64 MB in 8.0, 4 MB in older versions).
Common causes
- Large BLOB/TEXT values
- Huge multi-row INSERT statements in dumps
- Low server or client limit
⚡ Quick fix
- Raise max_allowed_packet on the server (and client for imports)
- Split large inserts
- Store large files outside the database
Detailed fix by platform
MySQL
SET GLOBAL max_allowed_packet = 268435456; -- and in my.cnf [mysqld]
How to diagnose
- Size — How big is the statement/row?
- Limits — Server and client values
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in MySQL
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 12 Oct 2026