add my.cnf for mysql database
parent
8c43951987
commit
dc26c9b0db
@ -0,0 +1,93 @@
|
|||||||
|
# For advice on how to change settings please see
|
||||||
|
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
|
||||||
|
#
|
||||||
|
[mysqld]
|
||||||
|
#
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# general
|
||||||
|
###########################
|
||||||
|
datadir=/mysql/data
|
||||||
|
tmpdir=/tmp
|
||||||
|
socket=/mysql/data/mysql.sock
|
||||||
|
log-error=/var/log/mysqld.log
|
||||||
|
pid-file=/var/run/mysqld/mysqld.pid
|
||||||
|
character-set-server=utf8mb4
|
||||||
|
collation-server=utf8mb4_general_ci
|
||||||
|
user=mysql
|
||||||
|
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# storage
|
||||||
|
###########################
|
||||||
|
default_storage_engine=InnoDB
|
||||||
|
innodb_file_per_table=on
|
||||||
|
innodb_data_home_dir=/mysql/data
|
||||||
|
innodb_log_group_home_dir=/mysql/data
|
||||||
|
#innodb_log_files_in_group=2 #deprecated
|
||||||
|
innodb_undo_directory=/mysql/data
|
||||||
|
#innodb_undo_tablespaces=3 #deprecated
|
||||||
|
innodb_undo_log_truncate=on
|
||||||
|
sync_binlog=1
|
||||||
|
early-plugin-load=keyring_file.so
|
||||||
|
keyring_file_data=/mysql/backup/keyring
|
||||||
|
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# connection
|
||||||
|
###########################
|
||||||
|
max_connections=500
|
||||||
|
wait_timeout=28800
|
||||||
|
interactive_timeout=28800
|
||||||
|
port=12138
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# logon
|
||||||
|
###########################
|
||||||
|
plugin-load-add=connection_control.so
|
||||||
|
connection-control=FORCE_PLUS_PERMANENT
|
||||||
|
connection-control-failed-login-attempts=FORCE_PLUS_PERMANENT
|
||||||
|
connection-control-failed-connections-threshold=5
|
||||||
|
connection-control-min-connection-delay=86400000
|
||||||
|
connection-control-max-connection-delay=86400000
|
||||||
|
|
||||||
|
plugin-load-add=validate_password.so
|
||||||
|
validate_password=FORCE_PLUS_PERMANENT
|
||||||
|
validate_password.length=13
|
||||||
|
validate_password.policy=1
|
||||||
|
validate_password.mixed_case_count=1
|
||||||
|
validate_password.number_count=1
|
||||||
|
validate_password.special_char_count=1
|
||||||
|
default_password_lifetime=90
|
||||||
|
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# auditing
|
||||||
|
##############################
|
||||||
|
general_log=on
|
||||||
|
general_log_file=/mysql/backup/log/mysql.log
|
||||||
|
general_log=1
|
||||||
|
log_timestamps=system
|
||||||
|
long_query_time=10
|
||||||
|
slow_query_log=on
|
||||||
|
log-queries-not-using-indexes=on
|
||||||
|
slow-query-log-file=/mysql/backup/log/slowquery.log
|
||||||
|
log-bin=mysql-bin
|
||||||
|
binlog_format=mixed
|
||||||
|
server-id=1
|
||||||
|
|
||||||
|
|
||||||
|
#############################
|
||||||
|
# ssl/tls
|
||||||
|
#############################
|
||||||
|
ssl=on
|
||||||
|
ssl-ca=/etc/mysql/certs/ca-cert.pem
|
||||||
|
ssl-cert=/etc/mysql/certs/server-cert.pem
|
||||||
|
ssl-key=/etc/mysql/certs/server-key.pem
|
||||||
|
#require_secure_transport=on
|
||||||
|
|
||||||
|
|
||||||
|
[client]
|
||||||
|
socket=/mysql/data/mysql.sock
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue