/
default.cnf
75 lines (71 loc) · 2.44 KB
/
default.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
# basic config parameters for all db instances in the grid
sql_mode = STRICT_TRANS_TABLES
back_log = 50
binlog_format = statement
character_set_server = utf8
collation_server = utf8_general_ci
connect_timeout = 30
datadir = {{.DataDir}}
default-storage-engine = innodb
expire_logs_days = 3
innodb_autoextend_increment = 64
innodb_buffer_pool_size = 32M
innodb_data_file_path = ibdata1:10M:autoextend
innodb_data_home_dir = {{.InnodbDataHomeDir}}
innodb_file_per_table
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT
innodb_lock_wait_timeout = 20
innodb_log_buffer_size = 8M
innodb_log_file_size = 64M
innodb_log_files_in_group = 2
innodb_log_group_home_dir = {{.InnodbLogGroupHomeDir}}
innodb_max_dirty_pages_pct = 75
innodb_support_xa = 0
innodb_thread_concurrency = 20
key_buffer_size = 32M
log-error = {{.ErrorLogPath}}
long_query_time = 2
max_allowed_packet = 16M
max_connections = 100
net_write_timeout = 60
pid-file = {{.PidFile}}
port = {{.MysqlPort}}
query_cache_size = 0
query_cache_type = 0
# all db instances should start in read-only mode - once the db is started and
# fully functional, we'll push it into read-write mode
read-only
read_buffer_size = 1M
read_rnd_buffer_size = 1M
server-id = {{.ServerID}}
skip-name-resolve
# all db instances should skip the slave startup - that way we can do any
# additional configuration (like enabling semi-sync) before we connect to
# the master.
skip_slave_start
slave_net_timeout = 60
slave_load_tmpdir = {{.SlaveLoadTmpDir}}
slow-query-log
slow-query-log-file = {{.SlowLogPath}}
socket = {{.SocketFile}}
sort_buffer_size = 2M
table_open_cache = 2048
thread_cache_size = 200
tmpdir = {{.TmpDir}}
tmp_table_size = 32M
transaction-isolation = REPEATABLE-READ
# Semi-sync replication is required for automated unplanned failover
# (when the master goes away). Here we just load the plugin so it's
# available if desired, but it's disabled at startup.
#
# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync
# at the proper time when replication is set up, or when masters are
# promoted or demoted.
plugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so
# When semi-sync is enabled, don't allow fallback to async
# if you get no ack, or have no slaves. This is necessary to
# prevent alternate futures when doing a failover in response to
# a master that becomes unresponsive.
rpl_semi_sync_master_timeout = 1000000000000000000
rpl_semi_sync_master_wait_no_slave = 1