mysql5.7 opencms安装解决方案 .Your 'max_allowed_packet' variable is set to less than 16777216 Byte (16MB)
2017-03-23 11:20
423 查看
opencms安装出现下面的问题:Your‘max_allowed_packet’ variable is set to lessthan 16777216 Byte (16MB).,maxallowedpacket。
一、问题
在安装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).
解决方案:
首先博主mysql5.7的配置文件名为:my-defailt.ini
我的解决方案是先将my-default.ini改名为my.ini
后将下段文本代替之前的[b]my-defailt.ini文本:[/b]
[b]
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
default-character-set=utf8
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir = C:\mysql-5.7.17-winx64"
datadir = "C:\mysql-5.7.17-winx64\data"
tmpdir = "C:\mysql-5.7.17-winx64\data"
socket = "C:\mysql-5.7.17-winx64\data\mysql.sock"
port = 3306
log-error = "C:\mysql-5.7.17-winx64\data\mysql_error.log"
# server_id = .....
max_connections = 100
table_open_cache = 256
query_cache_size = 1M
tmp_table_size = 32M
thread_cache_size = 8
innodb_data_home_dir = "C:\mysql-5.7.17-winx64\data\"
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 128M
innodb_buffer_pool_size = 128M
innodb_log_file_size = 10M
innodb_thread_concurrency = 16
innodb-autoextend-increment = 1000
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
max_allowed_packet = 32M
explicit_defaults_for_timestamp = true
sql_mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
其中将路径都改为自己的mysql安装目录。[/b]
管理员权限运行cmd
输入net stop mysql
net start mysql
两个命令进行重启。
这样就可以解决[b]MySQL system variable 'max_allowed_packet' is set to 1048576
Byte 问题了。[/b]
一、问题
在安装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).
解决方案:
首先博主mysql5.7的配置文件名为:my-defailt.ini
我的解决方案是先将my-default.ini改名为my.ini
后将下段文本代替之前的[b]my-defailt.ini文本:[/b]
[b]
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
default-character-set=utf8
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir = C:\mysql-5.7.17-winx64"
datadir = "C:\mysql-5.7.17-winx64\data"
tmpdir = "C:\mysql-5.7.17-winx64\data"
socket = "C:\mysql-5.7.17-winx64\data\mysql.sock"
port = 3306
log-error = "C:\mysql-5.7.17-winx64\data\mysql_error.log"
# server_id = .....
max_connections = 100
table_open_cache = 256
query_cache_size = 1M
tmp_table_size = 32M
thread_cache_size = 8
innodb_data_home_dir = "C:\mysql-5.7.17-winx64\data\"
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 128M
innodb_buffer_pool_size = 128M
innodb_log_file_size = 10M
innodb_thread_concurrency = 16
innodb-autoextend-increment = 1000
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
max_allowed_packet = 32M
explicit_defaults_for_timestamp = true
sql_mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
其中将路径都改为自己的mysql安装目录。[/b]
管理员权限运行cmd
输入net stop mysql
net start mysql
两个命令进行重启。
这样就可以解决[b]MySQL system variable 'max_allowed_packet' is set to 1048576
Byte 问题了。[/b]
相关文章推荐
- Mysql 导入 sql 文件报错 Your 'max_allowed_packet' variable is set to less than 16777216 Byte
- opencms 安装出现以下的问题:Your 'max_allowed_packet' variable is set to less than 16777216 Byte (16MB).
- MySQL system variable 'max_allowed_packet' is set to (1MB).
- opencms 安装出现下面的问题:Your 'max_allowed_packet' variable is set to less than 16777216 Byte (16MB).
- tesseract-ocr 出现 错误 Please make sure the TESSDATA_PREFIX environment variable is set to the parent d irectory of your "tessdata" directory.解决方案
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- MySQL5中大数据错误:Packet for query is too large (****** > ******). You can change this value on the server by setting the max_allowed_packet' variable.;
- 服务器的日志一直报Packet for query is too large (7632997 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.的解决方法
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- Got a packet bigger than 'max_allowed_packet' byte
- MySQL system variable 'max_allowed_packet' is set to (1MB).
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te
- MySQL报错:Packets larger than max_allowed_packet are not allowed 的解决方案
- Linux服务器上日志报com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1783 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
- Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "te