安装opencms时遇到问题及解决方法

时间:2022-03-21 21:57:42

1. MySQL system variable 'max_allowed_packet'

http://blog.csdn.net/hqa_ii/article/details/6872367

安装opencms时出现如下错误:

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).

解决方法:

找到mysql的安装路径,找到my.ini文件,打开后在末尾行添加 max_allowed_packet=16M ,然后重启mysql服务即可。

2. ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value

http://hi.baidu.com/ideas/item/711f154525324203e935047e

MySQL 5,Field 'id' doesn't have a default value 
或者建立新用户时出现ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value 解决办法:
打开my.ini,查找

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

修改为

sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

然后重启MYSQL

3.  安装向导

use mysql;

insert into user(Host,User,Password) values('localhost', 'opencmsuser', password('admin'));

insert into db values ('localhost', 'opencms', 'opencmsuser','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
flush privileges;