To fix, “MySQL Error 1153 – Got a packet bigger than ‘max_allowed_packet’ bytes” on Ubuntu edit your /etc/mysql/mysql.conf.d/mysqld.cnf.

sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

Once you have opened the file, increase the max_allowed_packet to a value that works for your environment. For example, in a local development environment, 100M can work.

max_allowed_packet=100M

Then restart MySQL.

sudo service mysql restart

Resources


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get Involved & Explore More

an abstract painting with blue and yellow colors

Catch up on what I’ve been writing lately.

Show your gratitude.

Join Dare To Code Email List

Get emails from me on full-stack PHP development by subscribing to the Dare To Code mailing list.