How to change max_allowed_packet value in mysql?

来源:互联网 发布:linux用yum安装svn 编辑:程序博客网 时间:2024/05/29 13:26

 

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.

原创粉丝点击