forked from judasn/Linux-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmy.cnf
More file actions
92 lines (84 loc) · 2.17 KB
/
my.cnf
File metadata and controls
92 lines (84 loc) · 2.17 KB
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
[mysql]
port = 3306
socket = /usr/program/mysql/data/mysql.sock
default-character-set = utf8
[mysqld]
user = mysql
port = 3306
server-id = 100866
default-storage-engine = InnoDB
socket = /usr/program/mysql/data/mysql.sock
pid-file = /usr/program/mysql/data/mysql.pid
collation-server = utf8_general_ci
init_connect = 'SET NAMES utf8'
character-set-server = utf8
basedir = /usr/program/mysql
datadir = /usr/program/mysql/data
log-error = /usr/program/mysql/data/mysql-error.log
back_log = 512
max_connections = 1000
max_allowed_packet = 120M
max_connect_errors = 1000000
skip-name-resolve
open_files_limit = 65535
table_open_cache = 2048
binlog_cache_size = 20M
max_heap_table_size = 40M
tmp_table_size = 64M
read_buffer_size = 20M
read_rnd_buffer_size = 20M
sort_buffer_size = 20M
join_buffer_size = 20M
key_buffer_size = 40M
thread_cache_size = 100
thread_stack = 20M
# 5.6.8之后这个不再建议开启了,所以要关掉
query_cache_type = 0
query_cache_size = 40M
query_cache_limit = 10M
ft_min_word_len = 4
log-bin = /usr/program/mysql/data/mysql-bin
binlog-format = mixed
expire_logs_days = 14
sync_binlog = 0
log-queries-not-using-indexes = 1
slow_query_log = 0
long_query_time = 3
slow_query_log_file = /usr/program/mysql/data/mysql-slow.log
performance_schema = 0
explicit_defaults_for_timestamp = true
lower_case_table_names = 1
skip_external_locking
table_definition_cache = 1024
thread_concurrency = 2
innodb = FORCE
innodb_flush_method = O_DIRECT
innodb_file_per_table = 1
innodb_open_files = 500
innodb_thread_concurrency = 0
innodb_purge_threads = 1
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 20M
innodb_log_file_size = 256M
innodb_log_files_in_group = 2
innodb_lock_wait_timeout = 120
innodb_additional_mem_pool_size = 20M
innodb_buffer_pool_size = 3G
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_io_capacity = 2000
innodb_max_dirty_pages_pct = 90
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 64M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
interactive_timeout = 28800
wait_timeout = 3600
[mysqldump]
quick
max_allowed_packet = 120M
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 20M
write_buffer = 20M