RuoYi/docker/docker-mysql/conf.d/config-file.cnf

35 lines
1.1 KiB
INI
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
## 默认字符集 utf8
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
# 表名不区分大小写
lower_case_table_names=1
#数据库数据存储目录
datadir=/var/lib/mysql
## Mysql 最大连接数,直接影响 Mysql 应用的并发处理能力( 500~1000 是个比较合适的值,注意每建立的连接都会占用一定的内存空间,直到连接被关闭才释放内存
max_connections = 1000
## 连接超时时间为 20 秒
connect_timeout = 20
## 网络传输中一次消息量的最大值,默认 4M ,必须设为 1024 的整倍数
max_allowed_packet = 16M
## Innodb 存储引擎核心参数,用于缓存 Innodb 表的索引、数据( 默认 128M ,单独使用 Innodb 存储引擎且单一 Mysql 服务时建议设为物理内存的 70% - 80 %
innodb_buffer_pool_size = 512M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid