I am using MAMP Basic on my MacBook Pro for local development for work. And today I have encountered a problem when updating a database  field which is larger than the default max_allowed_packet 1M. MAMP Basic doesn’t have its own my.cnf file, so every MySQL configuration is default out of the box. In order to change the MySQL configuration, I did the following: Copy sample my.cnf file to destination directory:
cp /Applications/MAMP/Library/share/mysql/my-small.cnf /Applications/MAMP/db/mysql/my.cnf

And then open the new file and modify on line 31 to the following:
max_allowed_packet = 10M

Finally restart MySQL server and that is it. Hope this helps.

Leave a Reply

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