You are viewing posts tagged web development.

Upgrading Max Allowed Packet

This post won’t apply to everyone. If you’re a web developer like me and you have a local MySQL database on your Snow Leopard Mac, you’ll have noticed that every time you upgrade your OS it breaks MySQL, and the specific nagging error I get after it’s up and running again is that a transfer has “exceeded MAX_ALLOWED_PACKET bytes.”

Here’s the incredibly simple way of dealing with this:

  1. open terminal
  2. sudo cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
  3. edit /etc/my.cnf (this step assumes you’re using textwrangler, use whatever you like)
  4. max_allowed_packet is on line 31, change it from 1M to something more respectable, such as 12M
  5. save and restart mysql

No more packet errors!