-
Notifications
You must be signed in to change notification settings - Fork 0
/
deault_my.cnf
65 lines (53 loc) · 1.99 KB
/
deault_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
# The following values assume you have at least 6G ram
[mysql]
# CLIENT #
# port = 3306
# socket = /var/lib/mysql/mysql.sock
[mysqld]
# GENERAL #
# user = mysql
default-storage-engine = InnoDB
# socket = /var/lib/mysql/mysql.sock
# pid-file = /var/lib/mysql/mysql.pid
skip-name-resolve = 1
# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
# DATA STORAGE #
datadir = /var/lib/mysql/
# BINARY LOGGING #
log-bin = /var/lib/mysql/mysql-bin
expire-logs-days = 14
sync-binlog = 1
# CACHES AND LIMITS #
tmp-table-size = 128M
max-heap-table-size = 128M
query-cache-type = 0
query-cache-size = 00
query_cache_limit = 256K
query_cache_min_res_unit = 2k
max-connections = 800
thread-cache-size = 100
open-files-limit = 65535
table-definition-cache = 32768
table-open-cache = 32768
# INNODB #
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 1G
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 4G
innodb-buffer-pool-instances = 3
innodb-large-prefix = true
innodb-file-per-table = true
# LOGGING #
log-error = /var/lib/mysql/mysql-error.log
# log-queries-not-using-indexes = 1
# slow-query-log = 1
# slow-query-log-file = /var/lib/mysql/mysql-slow.log
!includedir /etc/mysql/conf.d/