MySQL system variable 'max_allowed_packet'_MySQL
程序员文章站
2022-05-30 15:49:44
...
安装opencms使用mysql数据库时,出现错误 Java代码
- MySQL system variable 'max_allowed_packet' is set to 1048576 Byte (1MB).
- Please note that it will not be possible for OpenCms to handle files bigger than this value in the VFS.
- Error while checking the server configuration!
- -------------------------------------------
- Your 'max_allowed_packet' variable is set to less than 16777216 Byte (16MB).
- The required value for running OpenCms is at least 16MB.Please change your MySQL configuration (in the my.ini or my.cnf file).
解决如下:
这个问题是因为导入的sql文件大于系统默认的max_allowed_packet的值,解决方法:比如在my.cnf修改增加 到:max_allowed_packet=16M #或者更高,当然也可以在mysqld启动的时候加入这个参数,但是该变量必须在mysqld重新启动的时候才加载生效,所以必须重起mysqld!
推荐阅读
-
Mysql5.7修改用户密码,报错“Unknown trigger has an error in its body: ‘Unknown system variable ‘maintain_user”
-
mysql: [ERROR] unknown variable ‘sql-mode=STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,
-
MySQL下perror工具查看System Error Code信息
-
Read-olny file system-mysql建表不成功
-
Web应用程序 [new_system] 注册了JDBC驱动程序 [com.mysql.jdbc.Driver],但在Web应用程序停止时无法注销它。 为防止内存泄漏,JDBC驱动程序已被强制取消注册
-
EF(EntityFramework)与mysql使用,序列化问题[System.ObjectDisposedException]
-
C#连接MySQL数据库报错:类型“System.Data.Common.DbConnection”在未被引用的程序集中定义的解决
-
wampmysqld: unknown variable 'default-character-_MySQL
-
Lost connection to MySQL server at 'reading authorization packet', system error: 0_MySQL
-
Why doesn't AlTER SYSTEM SET EVENTS set the events or traci_MySQL