blob: b47f64f1f8a614d4903de2b551fcef2c9adb5c26 [file] [log] [blame]
Aharoni, Pavel (pa0916)ca3cb012018-10-22 15:29:57 +03001# MariaDB database server configuration file.
2#
3# You can copy this file to one of:
4# - "/etc/mysql/my.cnf" to set global options,
5# - "~/.my.cnf" to set user-specific options.
6#
7# One can use all long options that the program supports.
8# Run program with --help to get a list of available options and with
9# --print-defaults to see which it would actually understand and use.
10#
11# For explanations see
12# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
13
14# This will be passed to all mysql clients
15# It has been reported that passwords should be enclosed with ticks/quotes
16# escpecially if they contain "#" chars...
17# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
18[client]
19port = 3306
20socket = /var/run/mysqld/mysqld.sock
21
22# Here is entries for some specific programs
23# The following values assume you have at least 32M ram
24
25# This was formally known as [safe_mysqld]. Both versions are currently parsed.
26[mysqld_safe]
27socket = /var/run/mysqld/mysqld.sock
28nice = 0
29
30[mysqld]
31lower_case_table_names = 1
32skip-host-cache
33skip-name-resolve
34#
35# * Basic Settings
36#
37#user = mysql
38pid-file = /var/run/mysqld/mysqld.pid
39socket = /var/run/mysqld/mysqld.sock
40port = 3306
41basedir = /usr
42datadir = /var/lib/mysql
43tmpdir = /tmp
44lc_messages_dir = /usr/share/mysql
45lc_messages = en_US
46skip-external-locking
47#
48# Instead of skip-networking the default is now to listen only on
49# localhost which is more compatible and is not less secure.
50#bind-address = 127.0.0.1
51#
52# * Fine Tuning
53#
54max_connections = 100
55connect_timeout = 5
56wait_timeout = 600
57max_allowed_packet = 16M
58thread_cache_size = 128
59sort_buffer_size = 4M
60bulk_insert_buffer_size = 16M
61tmp_table_size = 32M
62max_heap_table_size = 32M
63#
64# * MyISAM
65#
66# This replaces the startup script and checks MyISAM tables if needed
67# the first time they are touched. On error, make copy and try a repair.
68myisam_recover_options = BACKUP
69key_buffer_size = 128M
70#open-files-limit = 2000
71table_open_cache = 400
72myisam_sort_buffer_size = 512M
73concurrent_insert = 2
74read_buffer_size = 2M
75read_rnd_buffer_size = 1M
76#
77# * Query Cache Configuration
78#
79# Cache only tiny result sets, so we can fit more in the query cache.
80query_cache_limit = 128K
81query_cache_size = 64M
82# for more write intensive setups, set to DEMAND or OFF
83#query_cache_type = DEMAND
84#
85# * Logging and Replication
86#
87# Both location gets rotated by the cronjob.
88# Be aware that this log type is a performance killer.
89# As of 5.1 you can enable the log at runtime!
90#general_log_file = /var/log/mysql/mysql.log
91#general_log = 1
92#
93# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
94#
95# we do want to know about network errors and such
96#log_warnings = 2
97#
98# Enable the slow query log to see queries with especially long duration
99#slow_query_log[={0|1}]
100slow_query_log_file = /var/log/mysql/mariadb-slow.log
101long_query_time = 10
102#log_slow_rate_limit = 1000
103#log_slow_verbosity = query_plan
104
105#log-queries-not-using-indexes
106#log_slow_admin_statements
107#
108# The following can be used as easy to replay backup logs or for replication.
109# note: if you are setting up a replication slave, see README.Debian about
110# other settings you may need to change.
111#server-id = 1
112#report_host = master1
113#auto_increment_increment = 2
114#auto_increment_offset = 1
115#log_bin = /var/log/mysql/mariadb-bin
116#log_bin_index = /var/log/mysql/mariadb-bin.index
117# not fab for performance, but safer
118#sync_binlog = 1
119expire_logs_days = 10
120max_binlog_size = 100M
121# slaves
122#relay_log = /var/log/mysql/relay-bin
123#relay_log_index = /var/log/mysql/relay-bin.index
124#relay_log_info_file = /var/log/mysql/relay-bin.info
125#log_slave_updates
126#read_only
127#
128# If applications support it, this stricter sql_mode prevents some
129# mistakes like inserting invalid dates etc.
130#sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
131#
132# * InnoDB
133#
134# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
135# Read the manual for more InnoDB related options. There are many!
136default_storage_engine = InnoDB
137# you can't just change log file size, requires special procedure
138#innodb_log_file_size = 50M
139innodb_buffer_pool_size = 256M
140innodb_log_buffer_size = 8M
141innodb_file_per_table = 1
142innodb_open_files = 400
143innodb_io_capacity = 400
144innodb_flush_method = O_DIRECT
145#
146# * Security Features
147#
148# Read the manual, too, if you want chroot!
149# chroot = /var/lib/mysql/
150#
151# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
152#
153# ssl-ca=/etc/mysql/cacert.pem
154# ssl-cert=/etc/mysql/server-cert.pem
155# ssl-key=/etc/mysql/server-key.pem
156
157#
158# * Galera-related settings
159#
160[galera]
161# Mandatory settings
162#wsrep_on=ON
163#wsrep_provider=
164#wsrep_cluster_address=
165#binlog_format=row
166#default_storage_engine=InnoDB
167#innodb_autoinc_lock_mode=2
168#
169# Allow server to accept connections on all interfaces.
170#
171#bind-address=0.0.0.0
172#
173# Optional setting
174#wsrep_slave_threads=1
175#innodb_flush_log_at_trx_commit=0
176
177[mysqldump]
178quick
179quote-names
180max_allowed_packet = 16M
181
182[mysql]
183#no-auto-rehash # faster start of mysql but no tab completion
184
185[isamchk]
186key_buffer = 16M
187
188#
189# * IMPORTANT: Additional settings that can override those from this file!
190# The files must end with '.cnf', otherwise they'll be ignored.
191#
192!includedir /etc/mysql/conf.d/