I've created a my.cnf file and placed it according to this question. I've logged in to mysql as root and SET GLOBAL max_allowed_packet=536870912
. I've restarted MAMP. I keep getting this:
mysql> show variables like 'max_allowed_packet';
+--------------------+----------+
| Variable_name | Value |
+--------------------+----------+
| max_allowed_packet | 16777216 |
+--------------------+----------+
1 row in set (0.00 sec)
BTW,
$ which mysql
/Applications/MAMP/Library/bin/mysql
and
$ mysql --help | grep cnf
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/my.cnf /etc/mysql/my.cnf /Applications/MAMP/conf/my.cnf ~/.my.cnf
and
Why won't it change? What else can I try?
If you have MAMP set up to administer MySQL with phpMyAdmin then you can change this via the "Variables" tab in phpMyAdmin.
This was the only method which worked for me, trying to set it any other way would cause it to reset to 16M whenever I'd restart MySQL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With