File: //etc/my.cnf.d/server.cnf
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
# this is read by the standalone daemon and embedded servers
[server]
# this is only for the mysqld standalone daemon
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld/mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld]
#innodb_force_recovery=3
#innodb_force_recovery=1
#innodb_lock_wait_timeout=300
datadir=/var/lib/mysql
#datadir=/storage03/MYSQL_DIR/mysql
socket=/var/lib/mysql/mysql.sock
#socket=/storage03/MYSQL_DIR/mysql/mysql.sock
log-error=/var/log/mariadb/mariadb.log
pid-file=/run/mariadb/mariadb.pid
#interactive_timeout=180
#wait_timeout=180
# table_open_cache = 3072
# table_definition_cache = 4096
# max_heap_table_size = 64M
# tmp_table_size = 64M
# max_connections = 2000
# max_user_connections = 2000
max_allowed_packet = 100M
# thread_cache_size = 32
# query_cache_size = 64M
# InnoDB
# default-storage-engine=InnoDB
# default-table-type=InnoDB
# 80% of ram that is dedicated for the database (this needs to be adjusted to your system)
# innodb_buffer_pool_size = 24G
# number of CPU cores dedicated to the MySQL InnoDB backend
# innodb_buffer_pool_instances = 16
# innodb_undo_log_truncate = 100G
# innodb_data_file_path = ibdata1:64G:autoextend
# innodb_file_per_table = 1
# innodb_log_file_size = 512M
# innodb_log_files_in_group = 2
# MyISAM
# myisam_recover = backup,force
# Logging
log_warnings = 2
log_error = /var/log/mysql/error.log
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 1
log_queries_not_using_indexes = 1
min_examined_row_limit = 20
# Binary Log / Replication
# server_id = 1
# log-bin = mysql-bin
# binlog_cache_size = 1M
# sync_binlog = 8
# binlog_format = row
# expire_logs_days = 2
# max_binlog_size = 1G
# log-bin = /storage02/mysql-bin-log/mysql-bin
# relay-log = /storage02/mysql-bin-log/mysql/slave-relay.log
# relay-log-index = /storage02/mysql-bin-log/slave-relay-log.index
[mysqldump]
# Variable reference
# For MySQL 5.7+: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html
# For MariaDB: https://mariadb.com/kb/en/library/mysqldump/
quick
quote_names
max_allowed_packet = 1024M
#
# * Galera-related settings
#
[galera]
# Mandatory settings
#wsrep_on=ON
#wsrep_provider=
#wsrep_cluster_address=
#binlog_format=row
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
#bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0
# this is only for embedded server
[embedded]
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
# This group is only read by MariaDB-10.4 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.4]