-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathmy.cnf
95 lines (80 loc) · 1.99 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
[mysqld]
######
## SSL
######
require_secure_transport=ON
tls_version=TLSv1.2,TLSv1.3
ssl-ca=/etc/mysql-ssl/ca.pem
ssl-key=/etc/mysql-ssl/server-key.pem
ssl-cert=/etc/mysql-ssl/server-cert.pem
##########
## GENERAL
##########
port=3306
basedir=/usr
autocommit=0
bind-address=0.0.0.0
datadir=/var/lib/mysql
open_files_limit=32768
default_storage_engine=InnoDB
socket=/var/run/mysqld/mysqld.sock
pid-file=/var/run/mysqld/mysqld.pid
transaction-isolation=READ-COMMITTED
sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_VALUE_ON_ZERO
########################
## Charset and Collation
########################
character_set_server=utf8mb4
init_connect='SET NAMES utf8mb4'
collation_server=utf8mb4_unicode_ci
#########
## MyISAM
#########
key_buffer_size=128M
skip_external_locking=1
myisam_recover_options=FORCE,BACKUP
##################
## Caches / Limits
##################
tmp_table_size=128M
read_buffer_size=2M
sort_buffer_size=4M
thread_cache_size=128
join_buffer_size=10M
max_heap_table_size=128M
read_rnd_buffer_size=1M
# Table Cache Performance Settings
table_open_cache=5000
table_definition_cache=4096
table_open_cache_instances=16
##################
## InnoDB Settings
##################
innodb_flush_method=O_DIRECT
innodb_buffer_pool_size=1G
innodb_file_per_table=1
innodb_lock_wait_timeout=50
innodb_flush_log_at_trx_commit=2
innodb_log_file_size=512M
innodb_log_buffer_size=8M
innodb_doublewrite=1
innodb_flush_log_at_timeout=4
innodb_change_buffering=all
innodb_print_all_deadlocks=1
innodb_read_io_threads=16
innodb_write_io_threads=12
innodb_io_capacity=2000
innodb_io_capacity_max=5000
innodb_data_file_path=ibdata1:50M;ibdata2:12M:autoextend:max:500M
########################
## Connections / Network
########################
skip-name-resolve
wait_timeout=30
connect_timeout=10
max_connections=1024
max_connect_errors=10
max_allowed_packet=64M
lock_wait_timeout=3600
interactive_timeout=180
max_user_connections=100