首页

安装openCMS报错 - Your "max_allowed_packet" variable is set to less than 16777216 Byte(16MB)

标签:opencms,error,ERROR,max_allowed_packet,16MB,安装失败,cms,内容管理系统,OpenCms,教程     发布时间:2015-12-21   

一、问题现象

在安装opencms过程中,当提交数据库环境配置项,点击"下一步",界面提示"Your  'max_allowed_packet'  variable  is  set  to less than  16777216  Byte(16MB) "错误,详情如下截图所示

安装openCMS报错 - Your "max_allowed_packet" variable is set to less than 16777216  Byte(16MB)

二、解决步骤

1.  在mysql安装路径下找到"my.ini"文件,增加一行"max_allowed_packet=20M"(设置max_allowed_packet>=16M),如下图所示

安装openCMS报错 - Your "max_allowed_packet" variable is set to less than 16777216  Byte(16MB)

2. 保存my.ini文件,重启mysql服务,点击上一步(回退到数据库环境设置界面),再点击一下步,问题解决,如下图所示

安装openCMS报错 - Your "max_allowed_packet" variable is set to less than 16777216  Byte(16MB)

另,可通过mysql客户端命令行进行设置,具体如下

进入mysql server@b@>mysql -u root -p@b@Enter password: ************@b@.....@b@@b@mysql>set global max_allowed_packet = 2*1024*1024*10@b@...@b@mysql>show VARIABLES like '%max_allowed_packet%';