|
|
@ -1,12 +1,30 @@
|
|
|
|
# For advice on how to change settings please see
|
|
|
|
# For advice on how to change settings please see
|
|
|
|
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
|
|
|
|
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
[mysqldump]
|
|
|
|
|
|
|
|
socket=/mysql/data/mysql.sock
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[mysql]
|
|
|
|
|
|
|
|
socket=/mysql/data/mysql.sock
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[mysqld]
|
|
|
|
[mysqld]
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
# Memory
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
innodb_buffer_pool_size=2G
|
|
|
|
|
|
|
|
innodb_log_buffer_size=64M
|
|
|
|
|
|
|
|
tmp_table_size=64M
|
|
|
|
|
|
|
|
max_heap_table_size=64M
|
|
|
|
|
|
|
|
sort_buffer_size=4M
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###########################
|
|
|
|
############################################################
|
|
|
|
# general
|
|
|
|
# general
|
|
|
|
###########################
|
|
|
|
############################################################
|
|
|
|
datadir=/mysql/data
|
|
|
|
datadir=/mysql/data
|
|
|
|
tmpdir=/tmp
|
|
|
|
tmpdir=/tmp
|
|
|
|
socket=/mysql/data/mysql.sock
|
|
|
|
socket=/mysql/data/mysql.sock
|
|
|
@ -15,35 +33,44 @@ pid-file=/var/run/mysqld/mysqld.pid
|
|
|
|
character-set-server=utf8mb4
|
|
|
|
character-set-server=utf8mb4
|
|
|
|
collation-server=utf8mb4_general_ci
|
|
|
|
collation-server=utf8mb4_general_ci
|
|
|
|
user=mysql
|
|
|
|
user=mysql
|
|
|
|
|
|
|
|
local-infile=0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###########################
|
|
|
|
############################################################
|
|
|
|
# storage
|
|
|
|
# storage engine
|
|
|
|
###########################
|
|
|
|
############################################################
|
|
|
|
default_storage_engine=InnoDB
|
|
|
|
default_storage_engine=InnoDB
|
|
|
|
innodb_file_per_table=on
|
|
|
|
innodb_file_per_table=on
|
|
|
|
innodb_data_home_dir=/mysql/data
|
|
|
|
innodb_data_home_dir=/mysql/data
|
|
|
|
innodb_log_group_home_dir=/mysql/data
|
|
|
|
innodb_log_group_home_dir=/mysql/data
|
|
|
|
#innodb_log_files_in_group=2 #deprecated
|
|
|
|
innodb_redo_log_capacity=4G
|
|
|
|
innodb_undo_directory=/mysql/data
|
|
|
|
innodb_undo_directory=/mysql/data
|
|
|
|
|
|
|
|
#innodb_log_file_size=512M #deprecated
|
|
|
|
|
|
|
|
#innodb_log_files_in_group=2 #deprecated
|
|
|
|
#innodb_undo_tablespaces=3 #deprecated
|
|
|
|
#innodb_undo_tablespaces=3 #deprecated
|
|
|
|
innodb_undo_log_truncate=on
|
|
|
|
innodb_undo_log_truncate=on
|
|
|
|
sync_binlog=1
|
|
|
|
sync_binlog=1
|
|
|
|
early-plugin-load=keyring_file.so
|
|
|
|
early-plugin-load=keyring_file.so
|
|
|
|
keyring_file_data=/mysql/backup/keyring
|
|
|
|
keyring_file_data=/mysql/backup/keyring
|
|
|
|
|
|
|
|
default_table_encryption=on
|
|
|
|
|
|
|
|
table_encryption_privilege_check=on
|
|
|
|
|
|
|
|
innodb_redo_log_encrypt=on
|
|
|
|
|
|
|
|
innodb_undo_log_encrypt=on
|
|
|
|
|
|
|
|
block_encryption_mode=aes-256-cbc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###########################
|
|
|
|
############################################################
|
|
|
|
# connection
|
|
|
|
# connection
|
|
|
|
###########################
|
|
|
|
############################################################
|
|
|
|
max_connections=500
|
|
|
|
max_connections=500
|
|
|
|
wait_timeout=28800
|
|
|
|
wait_timeout=28800
|
|
|
|
interactive_timeout=28800
|
|
|
|
interactive_timeout=28800
|
|
|
|
port=12138
|
|
|
|
port=12138
|
|
|
|
|
|
|
|
|
|
|
|
###########################
|
|
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
# logon
|
|
|
|
# logon
|
|
|
|
###########################
|
|
|
|
############################################################
|
|
|
|
plugin-load-add=connection_control.so
|
|
|
|
plugin-load-add=connection_control.so
|
|
|
|
connection-control=FORCE_PLUS_PERMANENT
|
|
|
|
connection-control=FORCE_PLUS_PERMANENT
|
|
|
|
connection-control-failed-login-attempts=FORCE_PLUS_PERMANENT
|
|
|
|
connection-control-failed-login-attempts=FORCE_PLUS_PERMANENT
|
|
|
@ -53,33 +80,42 @@ connection-control-max-connection-delay=86400000
|
|
|
|
|
|
|
|
|
|
|
|
plugin-load-add=validate_password.so
|
|
|
|
plugin-load-add=validate_password.so
|
|
|
|
validate_password=FORCE_PLUS_PERMANENT
|
|
|
|
validate_password=FORCE_PLUS_PERMANENT
|
|
|
|
validate_password.length=13
|
|
|
|
validate_password_length=13
|
|
|
|
validate_password.policy=1
|
|
|
|
validate_password_policy=1
|
|
|
|
validate_password.mixed_case_count=1
|
|
|
|
validate_password_mixed_case_count=1
|
|
|
|
validate_password.number_count=1
|
|
|
|
validate_password_number_count=1
|
|
|
|
validate_password.special_char_count=1
|
|
|
|
validate_password_special_char_count=1
|
|
|
|
default_password_lifetime=90
|
|
|
|
default_password_lifetime=90
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##############################
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
# binlog
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
log-bin=/mysql/backup/log/mysql-bin
|
|
|
|
|
|
|
|
log_bin_index=/mysql/backup/log/binlog.index
|
|
|
|
|
|
|
|
binlog_format=mixed
|
|
|
|
|
|
|
|
#expire_logs_days=7 #deprecated
|
|
|
|
|
|
|
|
binlog_expire_logs_seconds=604800
|
|
|
|
|
|
|
|
max_binlog_size=100M
|
|
|
|
|
|
|
|
binlog_encryption=on
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
# auditing
|
|
|
|
# auditing
|
|
|
|
##############################
|
|
|
|
############################################################
|
|
|
|
general_log=on
|
|
|
|
general_log=on
|
|
|
|
general_log_file=/mysql/backup/log/mysql.log
|
|
|
|
general_log_file=/mysql/backup/log/mysql.log
|
|
|
|
general_log=1
|
|
|
|
|
|
|
|
log_timestamps=system
|
|
|
|
log_timestamps=system
|
|
|
|
long_query_time=10
|
|
|
|
long_query_time=10
|
|
|
|
slow_query_log=on
|
|
|
|
slow_query_log=on
|
|
|
|
log-queries-not-using-indexes=on
|
|
|
|
|
|
|
|
slow-query-log-file=/mysql/backup/log/slowquery.log
|
|
|
|
slow-query-log-file=/mysql/backup/log/slowquery.log
|
|
|
|
log-bin=mysql-bin
|
|
|
|
log-queries-not-using-indexes=on
|
|
|
|
binlog_format=mixed
|
|
|
|
|
|
|
|
server-id=1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#############################
|
|
|
|
############################################################
|
|
|
|
# ssl/tls
|
|
|
|
# ssl/tls
|
|
|
|
#############################
|
|
|
|
############################################################
|
|
|
|
ssl=on
|
|
|
|
ssl=on
|
|
|
|
ssl-ca=/etc/mysql/certs/ca-cert.pem
|
|
|
|
ssl-ca=/etc/mysql/certs/ca-cert.pem
|
|
|
|
ssl-cert=/etc/mysql/certs/server-cert.pem
|
|
|
|
ssl-cert=/etc/mysql/certs/server-cert.pem
|
|
|
@ -87,7 +123,19 @@ ssl-key=/etc/mysql/certs/server-key.pem
|
|
|
|
#require_secure_transport=on
|
|
|
|
#require_secure_transport=on
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[client]
|
|
|
|
############################################################
|
|
|
|
socket=/mysql/data/mysql.sock
|
|
|
|
# replication
|
|
|
|
|
|
|
|
# comment this block if replication is not used.
|
|
|
|
|
|
|
|
# Caution:
|
|
|
|
|
|
|
|
# server_id should differ between source and replica
|
|
|
|
|
|
|
|
# read-only should be set dynamically and persistently
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
server_id=1
|
|
|
|
|
|
|
|
relay-log=/mysql/backup/log/mysql-relay
|
|
|
|
|
|
|
|
max_binlog_size=500M
|
|
|
|
|
|
|
|
#read-only=0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|