<p>I'm importing a MySQL dump and getting the following error.</p>

<pre><code>$ mysql foo &lt; foo.sql 
ERROR 1153 (08S01) at line 96: Got a packet bigger than 'max_allowed_packet' bytes
</code></pre>

<p>Apparently there are attachments in the database, which makes for very large inserts.</p>

<hr>

<p>This is on my local machine, a Mac with MySQL 5 installed from the MySQL package.</p>

<p>Where do I change <code>max_allowed_packet</code> to be able to import the dump?  </p>

<p>Is there anything else I should set?  </p>

<p>Just running <code>mysql --max_allowed_packet=32M …</code> resulted in the same error.</p>

This can be changed in your
```
my.ini
```
file (on Windows, located in \Program Files\MySQL\MySQL Server) under the server section, for example:
```
```
[mysqld]

max_allowed_packet = 10M
```
```