container/centos8_mariadb/mysql/my.cnf
2021-11-26 20:36:49 +09:00

75 lines
2.1 KiB
INI

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/
#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]
# Port or socket location where to connect
# port = 3306
socket = /run/mysqld/mysqld.sock
# Import all .cnf files from configuration directory
[mariadbd]
skip-host-cache
skip-name-resolve
!includedir /etc/mysql/mariadb.conf.d/
!includedir /etc/mysql/conf.d/
#UTF-8
#CharacterSet
character_set_server = utf8
collation_server = utf8_unicode_ci
init_connect = 'SET NAMES utf8'
skip-character-set-client-handshake
#EUC-KR
#init_connect=SET collation_connection=euckr_korean_ci
#init_connect=SET NAMES euckr
#character-set-server=euckr
#collation-server=euckr_korean_ci
#Engine
#default-storage-engine = InnoDB
#innodb = FORCE
#Slowlog
slow_query_log = on
slow_query_log_file = /var/lib/mysql/slowquery-log_error.log
long_query_time = 3
log_queries_not_using_indexes = off
#innodb_force_recovery=1
#Tunning
key_buffer_size = 128M
max_allowed_packet = 16M
query_cache_size = 32M
sort_buffer_size = 5M
join_buffer_size = 64M
read_rnd_buffer_size = 8M
max_heap_table_size = 381M
table_open_cache = 2048
table_definition_cache = 1024
tmp_table_size=64M
thread_cache_size = 16
# Try number of CPU's*2 for thread_concurrency
#thread_concurrency = 8
explicit_defaults_for_timestamp = TRUE