-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathmy.cnf
More file actions
48 lines (42 loc) · 1.37 KB
/
my.cnf
File metadata and controls
48 lines (42 loc) · 1.37 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
# -------------------------------------------------------------------------------
# Mysql 基本配置模板
# -------------------------------------------------------------------------------
[mysqld]
# GENERAL
# -------------------------------------------------------------------------------
server_id = 2
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
pid_file = /var/lib/mysql/mysql.pid
user = mysql
port = 3306
default_storage_engine = InnoDB
default_time_zone = '+8:00'
character_set_server = utf8mb4
collation_server = utf8mb4_0900_ai_ci
# LOG
# -------------------------------------------------------------------------------
log_error = /var/log/mysql/mysql.log
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql_slow_query_log.log
long_query_time = 3
min_examined_row_limit = 100
expire_logs_days = 7
# InnoDB
# -------------------------------------------------------------------------------
innodb_buffer_pool_size = 4G
innodb_log_file_size = 128M
innodb_file_per_table = 1
innodb_flush_method = O_DIRECT
# MyIsam
# -------------------------------------------------------------------------------
key_buffer_size = 256M
# OTHER
# -------------------------------------------------------------------------------
tmp_table_size = 32M
max_heap_table_size = 32M
max_connections = 10000
open_files_limit = 65535
[client]
socket = /var/lib/mysql/mysql.sock
port = 3306