How to change max_allowed_packet value in mysql?

If you set it in the cnf(it may be my.ini file) you will likely need to restart the server. Optionally, that is a dynamic variable and can be SET GLOBAL or SET SESSION from the command line as well.So just do as follows.
mysql>show variables like’max_allowed_packet’;
mysql>set global max_allowed_packet=67108864;
mysql>exit;
Note: If you don't use global or use session,after execute exit command,max_allowed_packet value will be still 1048576.

你可能感兴趣的:(mysql)