This repository has been archived by the owner on Oct 20, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmy.cnf
657 lines (583 loc) · 27.7 KB
/
my.cnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
# ------------------------------------------------------------------------------
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or distribute
# this software, either in source code form or as a compiled binary, for any
# purpose, commercial or non-commercial, and by any means.
#
# In jurisdictions that recognize copyright laws, the author or authors of this
# software dedicate any and all copyright interest in the software to the
# public domain. We make this dedication for the benefit of the public at large
# and to the detriment of our heirs and successors. We intend this dedication
# to be an overt act of relinquishment in perpetuity of all present and future
# rights to this software under copyright law.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# For more information, please refer to <http://unlicense.org>
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# MySQL main configuration file. This configuration is targeted towards
# a MariaDB 5.5 server on a VPS server with only 2GB of RAM and limited
# computing power.
#
# Configuring a DBS like MySQL or MariaDB is hard work and needs a lot
# of tweaking all the time. Consider this configuration only as a start
# point for any other configuration and keep an eye on your DBS all the
# time. Especially if you have many write actions.
#
# You can check if any variables in this file are wrong with the
# following command:
# mysqld --help --verbose > /dev/null
#
# AUTHOR: Richard Fussenegger <richard@fussenegger.info>
# COPYRIGHT: 2015 Richard Fussenegger
# LICENSE: http://unlicense.org/ PD
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# CLIENT CONFIGURATION
# ------------------------------------------------------------------------------
[client]
# As always, all charsets default to utf8.
default_character_set = utf8
# The listening socket.
socket = /var/run/mysqld/mysqld.sock
# ------------------------------------------------------------------------------
# MYSQL SERVER STARTUP SCRIPT
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/mysqld-safe.html
# ------------------------------------------------------------------------------
[mysqld_safe]
# Write the error log to the given file.
#
# DEFAULT: syslog
log_error = /var/log/mysql/error.log
# The process priority (nice). Enter a value between -19 and 20; where
# -19 means highest priority.
#
# SEE: man nice
# DEFAULT: 0
nice = 0
# Do not write error messages to syslog; use error log file
#
# DEFAULT: false
skip_syslog = true
# The Unix socket file that the server should use when listening for
# local connections
#
# DEFAULT: ?
socket = /var/run/mysqld/mysqld.sock
# ------------------------------------------------------------------------------
# GLOBAL SERVER CONFIGURATION
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html
# ------------------------------------------------------------------------------
[mysqld]
# The number of outstanding connection requests MySQL can have. This
# limit is also defined by the operating system. You should not set this
# to the maximum the system allows, otherwise you might now be able to
# log in if all handles are in use!
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_back_log
# DEFAULT: OS value
back_log = 32000
# The MySQL installation base directory. Relative path names for other
# variables usually are resolved to the base directory.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_basedir
# DEFAULT:
basedir = /usr
# ALL character set related options are set to UTF-8. We do not support
# any other character set unless explictely stated by the user who's
# working with our database.
character_set_server = utf8
# ALL collations are set to utf8_general_ci because it's the fastest!
collation_server = utf8_general_ci
# MyISAM specific setting: the storage engine supports concurrent
# inserts to reduce contention between readers and writer for a given
# table.
#
# 0 = Disables concurrent inserts
# 1 = Enables concurrent insert for MyISAM table that do not have holes.
# 2 = Enables concurrent insert for all MyISAM tables.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_concurrent_insert
# SEE: http://dev.mysql.com/doc/refman/5.5/en/concurrent-inserts.html
# DEFAULT: 1
concurrent_insert = 2
# The number of seconds that mysqld server waits for a connect packet
# before responding with "Bad Handshake". The defautl value is 10 sec
# as of MySQL 5.0.52 and 5 seconds before that. Increasing the
# connect_timeout value might help if clients frequently encounter
# errors of the form "Lost connection to MySQL server at 'XXX', system
# error: errno".
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_connect_timeout
# DEFAULT: 10
connect_timeout = 5
# The MySQL data directory.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_datadir
# DEFAULT:
datadir = /var/lib/mysql
# The default storage engine to use on server startup. This storage
# engine will be used for all databases and tables unless the user sets
# a different engine in his session or query while creating a new table.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_default_storage_engine
# DEFAULT: InnoDB (since 5.5.5)
default_storage_engine = InnoDB
# Enable the MariaDB User Feedback Plugin.
#
# SEE: http://kb.askmonty.org/en/user-feedback-plugin/
enable_feedback = true
# The number of days for automatic binary log file removal.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_expire_logs_days
# DEFAULT: 0
expire_logs_days = 10
# The minimum size of the buffer that is used for plain index scans,
# range index scans, and joins that do not use indexes and thus perform
# full table scans. High values do not mean high performance. You should
# not set this to you very large amoutn globally. Instead stick to a
# small value and increase it only in sessions that are doing large
# joins. Drupal is performing a lot of joins, so we set this to a
# reasonable value.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_join_buffer_size
# DEFAULT: ?
join_buffer_size = 4M
# Index blocks for MyISAM tables are buffered and shared by all threads.
# The key_buffer_size is the size of the buffer used for index blocks.
# The key buffer is also known as the key cache.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_key_buffer_size
# DEFAULT: 8388608
key_buffer_size = 128M
# Whether large page support is enabled. You must ensure that your
# server has large page support and that it is configured properly. This
# can have a huge performance gain, so you might want to take care of
# this.
#
# You MUST have enough hugepages size for all buffers you defined.
# Otherwise you'll see errno 12 or errno 22 in your error logs!
# Hugepages can give you a hell of a headache if numbers aren't calc-
# ulated whisely, but it's totally worth it as you gain a lot of
# performance if you're handling huge data.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/large-page-support.html
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_large_pages
# DEFAULT: 0
large_pages = true
# The locale to use for error messages.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/error-message-language.html
# DEFAULT: ?
lc_messages = en_US
# The directory where error messages are located.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/error-message-language.html
# DEFAULT: ?
lc_messages_dir = /usr/share/mysql
# Whether the binary log is enabled. If the --log-bin option is used,
# then the value of this variable is ON; otherwise it is OFF. This
# variable reports only on the status of binary logging (enabled or
# disabled); it does not actually report the value to which --log-bin is
# set.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_log_bin
# DEFAULT: OFF
log_bin = /var/log/mysql/mariadb-bin
# The index file for binary log file names. See Section 5.2.4, �The
# Binary Log�. If you omit the file name, and if you did not specify one
# with --log-bin, MySQL uses host_name-bin.index as the file name.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html#option_mysqld_log-bin-index
# DEFAULT: OFF
log_bin_index = /var/log/mysql/mariadb-bin.index
# Specifies that only a fraction of sessions should be logged. Logging
# is enabled for every nth session. By default, n is 1, so logging is
# enabled for every session. Rate limiting is disabled for the
# replication thread.
#
# SEE: http://www.percona.com/doc/percona-server/5.5/diagnostics/slow_extended_55.html#log_slow_rate_limit
log_slow_rate_limit = 1000
# Specifies how much information to include in your slow log. The value
# is a comma-delimited string, and can contain any combination of the
# following values:
#
# - microtime: Log queries with microsecond precision (mandatory).
# - query_plan: Log information about the query``s execution plan (optional).
# - innodb: Log InnoDB statistics (optional).
# - full: Equivalent to all other values OR``ed together.
# - profiling: Enables profiling of all queries in all connections.
# - profiling_use_getrusage: Enables usage of the getrusage function.
#
# Values are OR``ed together.
#
# For example, to enable microsecond query timing and InnoDB statistics,
# set this option to microtime,innodb. To turn all options on, set the
# option to full.
#
# SEE: http://www.percona.com/doc/percona-server/5.5/diagnostics/slow_extended_55.html#log_slow_verbosity
log_slow_verbosity = query_plan
# Print out warnings such as Aborted connection... to the error log.
# Enabling this option is recommended, for example, if you use
# replication (you get more information about what is happening, such as
# messages about network failures and reconnections). This option is
# enabled (1) by default, and the default level value if omitted is 1.
# To disable this option, use --log-warnings=0. If the value is greater
# than 1, aborted connections are written to the error log, and access-
# denied errors for new connection attempts are written.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_log-warnings
# SEE: http://dev.mysql.com/doc/refman/5.5/en/communication-errors.html
# DEFAULT: 1
log_warnings = 2
# If a query takes longer than this many seconds, the server increments
# the Slow_queries status variable. If the slow query log is enabled,
# the query is logged to the slow query log file. This value is measured
# in real time, not CPU time, so a query that is under the threshold on
# a lightly loaded system might be above the threshold on a heavily
# loaded one. The minimum and default values of long_query_time are 0
# and 10, respectively. The value can be specified to a resolution of
# microseconds. For logging to a file, times are written including the
# microseconds part. For logging to tables, only integer times
# are written; the microseconds part is ignored.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_long_query_time
# SEE: http://dev.mysql.com/doc/refman/5.5/en/slow-query-log.html
# DEFAULT: 10
long_query_time = 10
# The maximum size of one packet or any generated/intermediate string.
# The packet message buffer is initialized to net_buffer_length bytes,
# but can grow up to max_allowed_packet bytes when needed. This value by
# default is small, to catch large (possibly incorrect) packets. You
# must increase this value if you are using large BLOB columns or long
# strings. It should be as big as the largest BLOB you want to use. The
# protocol limit for max_allowed_packet is 1GB. The value should be a
# multiple of 1024; nonmultiples are rounded down to the nearest
# multiple. When you change the message buffer size by changing the
# value of the max_allowed_packet variable, you should also change the
# buffer size on the client side if your client program permits it. On
# the client side, max_allowed_packet has a default of 1GB. Some
# programs such as mysql and mysqldump enable you to change the client-
# side value by setting max_allowed_packet on the command line or in an
# option file. The session value of this variable is read only.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_allowed_packet
# DEFAULT: ?
max_allowed_packet = 16M
# If a write to the binary log causes the current log file size to
# exceed the value of this variable, the server rotates the binary logs
# (closes the current file and opens the next one). The minimum value is
# 4096 bytes. The maximum and default value is 1GB. A transaction is
# written in one chunk to the binary log, so it is never split between
# several binary logs. Therefore, if you have big transactions, you
# might see binary log files larger than max_binlog_size. If
# max_relay_log_size is 0, the value of max_binlog_size applies to relay
# logs as well.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html#sysvar_max_binlog_size
# DEFAULT: 1073741824
max_binlog_size = 100M
# The maximum permitted number of simultaneous client connections.
# Increasing this value increases the number of file descriptors that
# mysqld requires.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html
# SEE: http://dev.mysql.com/doc/refman/5.5/en/table-cache.html
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_connections
# DEFAULT: 151
max_connections = 100
# This variable sets the maximum size to which user-created MEMORY
# tables are permitted to grow. The value of the variable is used to
# calculate MEMORY table MAX_ROWS values. Setting this variable has no
# effect on any existing MEMORY table, unless the table is re-created
# with a statement such as CREATE TABLE or altered with ALTER TABLE or
# TRUNCATE TABLE. A server restart also sets the maximum size of
# existing MEMORY tables to the global max_heap_table_size value. This
# variable is also used in conjunction with tmp_table_size to limit the
# size of internal in-memory tables.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_heap_table_size
# SEE: http://dev.mysql.com/doc/refman/5.5/en/internal-temporary-tables.html
# SEE: http://www.mysqlperformanceblog.com/2007/01/19/tmp_table_size-and-max_heap_table_size/
# DEFAULT: 16777216
max_heap_table_size = 32M
# Sets the MyISAM storage engine recovery mode.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_myisam-recover-options
# DEFAULT: OFF
myisam_recover_options = BACKUP
# The size of the buffer that is allocated when sorting MyISAM indexes
# during a REPAIR TABLE or when creating indexes with CREATE INDEX or
# ALTER TABLE.
#
# The maximum permissible setting for myisam_sort_buffer_size is 4GB.
# Values larger than 4GB are permitted for 64-bit platforms (except
# 64-bit Windows, for which large values are truncated to 4GB with a
# warning).
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_myisam_sort_buffer_size
# DEFAULT: 8388608
myisam_sort_buffer_size = 512M
# The absolute path to the process identifier (PID) file.
pid_file = /var/run/mysqld/mysqld.pid
# Do not cache results that are larger than this number of bytes. The
# default value is 1MB.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_query_cache_limit
# DEFAULT: 1048576
query_cache_limit = 128K
# The amount of memory allocated for caching query results. The permiss-
# ible values are multiples of 1024; other values are rounded down to
# the nearest multiple. The query cache needs a minimum size of about
# 40KB to allocate its structures.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_query_cache_size
# DEFAULT: 0
query_cache_size = 64M
# Sets the global query cache type. There are three possible enumeration
# values:
# 0 = Off
# 1 = Everything will be cached; except for SELECT SQL_NO_CACHE
# 2 = Only SELECT SQL_CACHE queries will be cached
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_query_cache_type
# DEFAULT: 1
query_cache_type = DEMAND
# Each thread that does a sequential scan for a MyISAM table allocates
# a buffer of this size (in bytes) for each table it scans. If you do
# many sequential scans, you might want to increase this value.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/memory-use.html
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_read_buffer_size
# DEFAULT: 131072
read_buffer_size = 2M
# When reading rows from a MyISAM table in sorted order following a key-
# sorting operation, the rows are read through this buffer to avoid disk
# seeks. Setting the variable to a large value can improve ORDER BY
# performance by a lot. However, this is a buffer allocated for each
# client, so you should not set the global variable to a large value.
# Instead, change the session variable only from within those clients
# that need to run large queries.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/order-by-optimization.html
# SEE: http://dev.mysql.com/doc/refman/5.5/en/memory-use.html
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_read_rnd_buffer_size
# DEFAULT: 262144
read_rnd_buffer_size = 1M
# Only use IP numbers and all Host columns values in the grant tables
# must be IP addresses or localhost.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/host-cache.html
# DEFAULT: false
skip_name_resolve = true
# Server permits only local (non TCP) connections via Unix sockets.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_skip_networking
# DEFAULT: false
skip_networking = true
slow_query_log_file = /var/log/mysql/slow.log
# The absolute path to the Unix socket where MySQL is listening for
# incoming client requests.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_socket
# DEFAULT: /tmp/mysql.sock
socket = /var/run/mysqld/mysqld.sock
# Each session that needs to do a sort allocates a buffer of this size.
# This is not specific to any storage engine and applies in a general
# manner for optimization.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/order-by-optimization.html
# DEFAULT: 2097144
sort_buffer_size = 4M
# SEE: http://dev.mysql.com/doc/refman/5.5/en/table-cache.html
# SEE: http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/
# SEE: http://www.mysqlperformanceblog.com/2009/11/26/more-on-table_cache/
# DEFAULT: ?
table_cache = 400
# How many threads the server should cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there are
# fewer than thread_cache_size threads there. Requests for threads are
# satisfied by reusing threads taken from the cache if possible, and
# only when the cache is empty is a new thread created. This variable
# can be increased to improve performance if you have a lot of new
# connections. Normally, this does not provide a notable performance
# improvement if you have a good thread implementation. However, if
# your server sees hundreds of connections use cached threads. By
# examining the difference between the connections and threads created
# status variables, you can see how efficient the thread cache is.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-status-variables.html
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_thread_cache_size
# DEFAULT: 0
thread_cache_size = 128
# The maximum size of internal in-memory temporary tables. (The actual
# limit is determined as the minimum of tmp_table_size and
# max_heap_table_size.) If an in-memory temporary table exceeds the
# limit, MySQL automatically converts it to an on-disk MyISAM table.
# Increase the value of tmp_table_size (and max_heap_table_size if
# necessary) if you do many advanced GROUP BY queries and you have lots
# of memory. This variable does not apply to user-created MEMORY tables.
#
# You can compare the number of internal on-disk temporary tables
# created to the total number of internal temporary tables created by
# comparing the values of the Created_tmp_disk_tables and
# Created_tmp_tables variables.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_tmp_table_size
# SEE: http://dev.mysql.com/doc/refman/5.5/en/internal-temporary-tables.html
# SEE: http://www.mysqlperformanceblog.com/2007/01/19/tmp_table_size-and-max_heap_table_size/
# DEFAULT: OS value
tmp_table_size = 32M
# The directory used for temporary files and temporary tables.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_tmpdir
# DEFAULT: ?
tmpdir = /tmp
# The number of seconds the server waits for activity on a
# noninteractive connection before closing it.
#
# On thread startup, the session wait_timeout value is initialized from
# the global wait_timeout value or from the global interactive_timeout
# value, depending on the type of client (as defined by the
# CLIENT_INTERACTIVE connect option to mysql_real_connect()).
#
# SEE: interactive_timeout
# SEE: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_wait_timeout
# DEFAULT: 28800
wait_timeout = 600
# Run the mysqld server as the user having the name user_name or the
# numeric user ID user_id
#
# DEFAULT: root
user = mysql
# ------------------------------------------------------------------------------
# INNODB / XTRADB CONFIGURATION
# ------------------------------------------------------------------------------
# The size of the memory buffer InnoDB / XtraDB uses to cache data and
# indexes of its tables. The larger this value, the less disk I/O is
# needed to access data in tables. A save value is 50% of the available
# operating system memory.
#
# total_size_databases + (total_size_databases * 0.1) = innodb_buffer_pool_size
#
# SEE: http://www.mysqlperformanceblog.com/2007/11/03/choosing-innodb_buffer_pool_size/
# SEE: http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size
# DEFAULT: 128M
innodb_buffer_pool_size = 256M
# If enabled, InnoDB / XtraDB creates each new table using its own .idb
# file for storing data and indexes, rather than in the system table-
# space. Table compression only works for tables stored in separate
# tablespaces.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/innodb-multiple-tablespaces.html
# SEE: http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_file_per_table
# DEFAULT: FALSE
innodb_file_per_table = true
# This setting can have a positive or negative effect on performance and
# should always be tested on the current server the DBS is running on!
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_flush_method
# DEFAULT: fdatasync
innodb_flush_method = O_DIRECT
# "InnoDB pages are organized in blocks of 64 pages. When the check-
# pointing algorithm has picked a dirty page to be written to disk, it
# checks if there are more dirty pages in the block and if yes, writes
# all those pages at once. The rationale is, that with rotating disks
# the most expensive part of a write operation is head movement. Once
# the head is over the right track, it does not make much difference if
# we write 10 or 100 sectors."
# ~~ Axel Schwenke
#
# Use none if you are on an SSD drive!
#
# SEE: http://blog.mariadb.org/how-to-tune-mariadb-write-performance/
# DEFAULT: area
innodb_flush_neighbor_pages = cont
# An upper limit on the I/O activity performed by the InnoDB background
# tasks, such as flushing pages from the buffer pool and merging data
# from the insert buffer.
#
# Refer to the manual of your drive to find out the IOPS.
#
# You can monitor the IOPS with e.g. iostat (package sysstat on Debian).
#
# SEE: http://blog.mariadb.org/how-to-tune-mariadb-write-performance/
# SEE: http://dev.mysql.com/doc/refman/5.5/en/innodb-performance-thread_io_rate.html
# SEE: http://dev.mysql.com/doc/refman/5.5/en/optimizing-innodb-diskio.html
# DEFAULT: 200
#
# Some commonly used SSD drives.
#innodb_io_capacity = 400 # Simple SLC SSD
#innodb_io_capacity = 5000 # Intel X25-E
#innodb_io_capacity = 20000 # G-Skill Phoenix Pro
#innodb_io_capacity = 60000 # OCZ Vertex 3
#innodb_io_capacity = 120000 # OCZ Vertex 4
#innodb_io_capacity = 200000 # OCZ RevoDrive 3 X2
#
# Only really fast SAS drives (15,000 rpm) are capable of reaching 200
# IOPS. You might consider lowering the value if you are using a slower
# drive.
#innodb_io_capacity = 100 # 7,200 rpm
#innodb_io_capacity = 150 # 10,000 rpm
#innodb_io_capacity = 200 # 15,000 rpm default
#
# I have an SAS RAID.
innodb_io_capacity = 400
# The size in bytes of the buffer that InnoDB uses to write to the log
# files on disk. A large log buffer enables large transactions to run
# without a need to write the log to disk before the transaction commit.
# Thus, if you have big transactions, making the log buffer larger saves
# disk I/O.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_log_buffer_size
# DEFAULT: 8388608
innodb_log_buffer_size = 8M
# This variable is relevant only if you use multiple tablespaces in
# InnoDB. It specifies the maximum number of .ibd files that InnoDB can
# keep open at one time. The minimum value is 10. The file descriptors
# use for .ibd files are for InnoDB only. They are independent of those
# specified by the --open-files-limit server option, and do not affect
# the operation of the table cache.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_open_files
# DEFAULT: 300
innodb_open_files = 400
# ------------------------------------------------------------------------------
# MYSQLDUMP CONFIGURATION
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html
# ------------------------------------------------------------------------------
[mysqldump]
# This option is useful for dumping large tables. It forces mysqldump to
# retrieve rows for a table from the server a row at a time rather then
# retrieving the entire row set and buffering it in memory before writing it
# out.
quick = true
# Quote identifiers (such as database, table, and column names) within `
# characters. If the ANSI_QUOTES SQL mode is enabled, identifiers are quoted
# within " characters. This option is enabled by default. It can be disabled
# with --skip-quote-names, but this option should be given after any option
# such as --compatible that may enable --quote-names.
#
# SEE: http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html#option_mysqldump_quote-names
# DEFAULT:
quote_names = true
# The maximum size of the buffer for client/server communication.
max_allowed_packet = 16M
[isamchk]
# SEE: mysqld.key_buffer
key_buffer = 16M
# ------------------------------------------------------------------------------
# Location from which mysqld might load additional configuration files. Note
# that these configuration files might override values set in this
# configuration file!
!includedir /etc/mysql/conf.d/