max_allowed_packet in mySQL I tried all three method explained here  to max_allowed_packet. But no one changes its value in my MySQL 5.6. 

I use show variables like '%max_allowed_packet%' to see its current value. But it always is 12582912. 

Only changing its value in my.ini is effective.

What is wrong?
You have two values of max_allowed_packet in MySQL :


one on the client side : [mysql] section, [mysqldump], [client] and more.
one on the server side : [mysqld] section.


The value of max_allowed_packet you see with the command show variables like 'max_allowed_packet'; is the one on the server side.

In order to increase this value, you must increase both sides : in your server configuration file ([mysqld] section in your my.ini file) and in your client configuration file (whether your [client] or [mysql] section in your my.ini file).

This setting can be changed on the server side without restarting the server if you have the SUPER privilege with this command : mysql&gt; SET GLOBAL max_allowed_packet = numeric;.

Don't forget to change the 'numeric' value by a numeric value. Don't forget to change your configuration file too otherwise this value will be reset at reboot.