-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmy.cnf
65 lines (53 loc) · 1.11 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
#
# The MySQL database server configuration file.
#
[client]
user=root
port=3306
socket=/tmp/mysql.sock
[mysql]
prompt=\u:\d>\_
[mysqld_safe]
socket=/tmp/mysql.sock
[mysqld]
#
# Basic Settings
#
default-storage-engine=innodb
skip-grant-tables
pid-file=/path/to/datadir/mysql.pid
socket=/tmp/mysql.sock
port=3306
datadir=/path/to/datadir/
log-error=/path/to/logdir/mysql_error.log
#
# InnoDB
#
# Innodb page size
innodb_page_size=4KB
# Buffer settings
innodb_buffer_pool_size=2G
innodb_buffer_pool_instances=8
innodb_lru_scan_depth=1024
# Transaction log settings
# Log group path (iblog0, iblog1)
innodb_log_group_home_dir=/path/to/logdir/
innodb_log_file_size=500M
innodb_log_files_in_group=3
innodb_log_buffer_size=32M
# Flush settings
# 0:every 1 seconds, 1:fsync on commits, 2:writes on commits
innodb_flush_log_at_trx_commit=0
innodb_flush_neighbors=0
innodb_flush_method=O_DIRECT
# AIO control
innodb_use_native_aio=true
# I/O settings
innodb_io_capacity=1000
innodb_io_capacity_max=2000
# Dirty page ratios
innodb_max_dirty_pages_pct=90
innodb_max_dirty_pages_pct_lwm=10
# etc
max_connections=1024
open_files_limit=24000