1 # MariaDB database server configuration file.
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.
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.
11 # For explanations see
12 # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
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.
20 socket = /var/run/mysqld/mysqld.sock
22 # Here is entries for some specific programs
23 # The following values assume you have at least 32M ram
25 # This was formally known as [safe_mysqld]. Both versions are currently parsed.
27 socket = /var/run/mysqld/mysqld.sock
37 pid-file = /var/run/mysqld/mysqld.pid
38 socket = /var/run/mysqld/mysqld.sock
41 datadir = /var/lib/mysql
43 lc_messages_dir = /usr/share/mysql
45 lower_case_table_names = 1
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
57 max_allowed_packet = 16M
58 thread_cache_size = 128
60 bulk_insert_buffer_size = 16M
62 max_heap_table_size = 32M
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.
68 myisam_recover_options = BACKUP
69 key_buffer_size = 128M
70 #open-files-limit = 2000
71 table_open_cache = 400
72 myisam_sort_buffer_size = 512M
75 read_rnd_buffer_size = 1M
77 # * Query Cache Configuration
79 # Cache only tiny result sets, so we can fit more in the query cache.
80 query_cache_limit = 128K
81 query_cache_size = 64M
82 # for more write intensive setups, set to DEMAND or OFF
83 #query_cache_type = DEMAND
85 # * Logging and Replication
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
93 # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
95 # we do want to know about network errors and such
98 # Enable the slow query log to see queries with especially long duration
99 #slow_query_log[={0|1}]
100 slow_query_log_file = /var/log/mysql/mariadb-slow.log
102 #log_slow_rate_limit = 1000
103 #log_slow_verbosity = query_plan
105 #log-queries-not-using-indexes
106 #log_slow_admin_statements
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.
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
119 expire_logs_days = 10
120 max_binlog_size = 100M
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
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
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!
136 default_storage_engine = InnoDB
137 # you can't just change log file size, requires special procedure
138 #innodb_log_file_size = 50M
139 innodb_buffer_pool_size = 256M
140 innodb_log_buffer_size = 8M
141 innodb_file_per_table = 1
142 innodb_open_files = 400
143 innodb_io_capacity = 400
144 innodb_flush_method = O_DIRECT
146 # * Security Features
148 # Read the manual, too, if you want chroot!
149 # chroot = /var/lib/mysql/
151 # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
153 # ssl-ca=/etc/mysql/cacert.pem
154 # ssl-cert=/etc/mysql/server-cert.pem
155 # ssl-key=/etc/mysql/server-key.pem
158 # * Galera-related settings
164 #wsrep_cluster_address=
166 #default_storage_engine=InnoDB
167 #innodb_autoinc_lock_mode=2
169 # Allow server to accept connections on all interfaces.
171 #bind-address=0.0.0.0
174 #wsrep_slave_threads=1
175 #innodb_flush_log_at_trx_commit=0
180 max_allowed_packet = 16M
183 #no-auto-rehash # faster start of mysql but no tab completion
189 # * IMPORTANT: Additional settings that can override those from this file!
190 # The files must end with '.cnf', otherwise they'll be ignored.
192 #!includedir /etc/mysql/conf.d/