1 # MariaDB database server configuration file.
\r
3 # You can copy this file to one of:
\r
4 # - "/etc/mysql/my.cnf" to set global options,
\r
5 # - "~/.my.cnf" to set user-specific options.
\r
7 # One can use all long options that the program supports.
\r
8 # Run program with --help to get a list of available options and with
\r
9 # --print-defaults to see which it would actually understand and use.
\r
11 # For explanations see
\r
12 # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
\r
14 # This will be passed to all mysql clients
\r
15 # It has been reported that passwords should be enclosed with ticks/quotes
\r
16 # escpecially if they contain "#" chars...
\r
17 # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
\r
20 socket = /var/run/mysqld/mysqld.sock
\r
22 # Here is entries for some specific programs
\r
23 # The following values assume you have at least 32M ram
\r
25 # This was formally known as [safe_mysqld]. Both versions are currently parsed.
\r
27 socket = /var/run/mysqld/mysqld.sock
\r
31 lower_case_table_names = 1
\r
38 pid-file = /var/run/mysqld/mysqld.pid
\r
39 socket = /var/run/mysqld/mysqld.sock
\r
42 datadir = /var/lib/mysql
\r
44 lc_messages_dir = /usr/share/mysql
\r
46 skip-external-locking
\r
48 # Instead of skip-networking the default is now to listen only on
\r
49 # localhost which is more compatible and is not less secure.
\r
50 #bind-address = 127.0.0.1
\r
54 max_connections = 100
\r
57 max_allowed_packet = 16M
\r
58 thread_cache_size = 128
\r
59 sort_buffer_size = 4M
\r
60 bulk_insert_buffer_size = 16M
\r
61 tmp_table_size = 32M
\r
62 max_heap_table_size = 32M
\r
66 # This replaces the startup script and checks MyISAM tables if needed
\r
67 # the first time they are touched. On error, make copy and try a repair.
\r
68 myisam_recover_options = BACKUP
\r
69 key_buffer_size = 128M
\r
70 #open-files-limit = 2000
\r
71 table_open_cache = 400
\r
72 myisam_sort_buffer_size = 512M
\r
73 concurrent_insert = 2
\r
74 read_buffer_size = 2M
\r
75 read_rnd_buffer_size = 1M
\r
77 # * Query Cache Configuration
\r
79 # Cache only tiny result sets, so we can fit more in the query cache.
\r
80 query_cache_limit = 128K
\r
81 query_cache_size = 64M
\r
82 # for more write intensive setups, set to DEMAND or OFF
\r
83 #query_cache_type = DEMAND
\r
85 # * Logging and Replication
\r
87 # Both location gets rotated by the cronjob.
\r
88 # Be aware that this log type is a performance killer.
\r
89 # As of 5.1 you can enable the log at runtime!
\r
90 #general_log_file = /var/log/mysql/mysql.log
\r
93 # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
\r
95 # we do want to know about network errors and such
\r
98 # Enable the slow query log to see queries with especially long duration
\r
99 #slow_query_log[={0|1}]
\r
100 slow_query_log_file = /var/log/mysql/mariadb-slow.log
\r
101 long_query_time = 10
\r
102 #log_slow_rate_limit = 1000
\r
103 #log_slow_verbosity = query_plan
\r
105 #log-queries-not-using-indexes
\r
106 #log_slow_admin_statements
\r
108 # The following can be used as easy to replay backup logs or for replication.
\r
109 # note: if you are setting up a replication slave, see README.Debian about
\r
110 # other settings you may need to change.
\r
112 #report_host = master1
\r
113 #auto_increment_increment = 2
\r
114 #auto_increment_offset = 1
\r
115 #log_bin = /var/log/mysql/mariadb-bin
\r
116 #log_bin_index = /var/log/mysql/mariadb-bin.index
\r
117 # not fab for performance, but safer
\r
119 expire_logs_days = 10
\r
120 max_binlog_size = 100M
\r
122 #relay_log = /var/log/mysql/relay-bin
\r
123 #relay_log_index = /var/log/mysql/relay-bin.index
\r
124 #relay_log_info_file = /var/log/mysql/relay-bin.info
\r
128 # If applications support it, this stricter sql_mode prevents some
\r
129 # mistakes like inserting invalid dates etc.
\r
130 #sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
\r
134 # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
\r
135 # Read the manual for more InnoDB related options. There are many!
\r
136 default_storage_engine = InnoDB
\r
137 # you can't just change log file size, requires special procedure
\r
138 #innodb_log_file_size = 50M
\r
139 innodb_buffer_pool_size = 256M
\r
140 innodb_log_buffer_size = 8M
\r
141 innodb_file_per_table = 1
\r
142 innodb_open_files = 400
\r
143 innodb_io_capacity = 400
\r
144 innodb_flush_method = O_DIRECT
\r
146 # * Security Features
\r
148 # Read the manual, too, if you want chroot!
\r
149 # chroot = /var/lib/mysql/
\r
151 # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
\r
153 # ssl-ca=/etc/mysql/cacert.pem
\r
154 # ssl-cert=/etc/mysql/server-cert.pem
\r
155 # ssl-key=/etc/mysql/server-key.pem
\r
158 # * Galera-related settings
\r
161 # Mandatory settings
\r
164 #wsrep_cluster_address=
\r
166 #default_storage_engine=InnoDB
\r
167 #innodb_autoinc_lock_mode=2
\r
169 # Allow server to accept connections on all interfaces.
\r
171 #bind-address=0.0.0.0
\r
174 #wsrep_slave_threads=1
\r
175 #innodb_flush_log_at_trx_commit=0
\r
180 max_allowed_packet = 16M
\r
183 #no-auto-rehash # faster start of mysql but no tab completion
\r
189 # * IMPORTANT: Additional settings that can override those from this file!
\r
190 # The files must end with '.cnf', otherwise they'll be ignored.
\r
192 !includedir /etc/mysql/conf.d/