1
+ # For advice on how to change settings please see
2
+ # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
3
+ # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
4
+ # *** default location during install, and will be replaced if you
5
+ # *** upgrade to a newer version of MySQL.
6
+
7
+ [client]
8
+ port = 3306
9
+
10
+ [mysqld]
11
+
12
+ # Remove leading # and set to the amount of RAM for the most important data
13
+ # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
14
+ # innodb_buffer_pool_size = 128M
15
+
16
+ # Remove leading # to turn on a very important data integrity option: logging
17
+ # changes to the binary log between backups.
18
+ # log_bin
19
+
20
+ # These are commonly set, remove the # and set as required.
21
+
22
+ user = mysql
23
+ # basedir = /usr/local/mysql
24
+ datadir = /var/lib/mysql
25
+ port = 3306
26
+ server-id = 1
27
+ default-time-zone = +8:00
28
+ log_timestamps = SYSTEM
29
+
30
+ character-set-server = utf8mb4
31
+ collation-server = utf8mb4_unicode_ci
32
+
33
+ socket = /var/run/mysqld/mysqld.sock
34
+ pid-file = /var/run/mysqld/mysqld.pid
35
+
36
+ log-error = /var/lib/mysql/error.log
37
+ general_log = 1
38
+ general_log_file = /var/lib/mysql/general.log
39
+ slow_query_log = 1
40
+ slow_query_log_file = /var/lib/mysql/slow.log
41
+ long_query_time = 1
42
+ log_slow_admin_statements = 1
43
+ log_queries_not_using_indexes = 1
44
+
45
+
46
+ skip-name-resolve
47
+ # skip-networking
48
+ back_log = 500
49
+
50
+ max_connections = 3000
51
+ max_connect_errors = 6000
52
+ open_files_limit = 65535
53
+ table_open_cache = 128
54
+ max_allowed_packet = 4M
55
+ binlog_cache_size = 1M
56
+ max_heap_table_size = 8M
57
+ tmp_table_size = 16M
58
+
59
+ read_buffer_size = 2M
60
+ read_rnd_buffer_size = 8M
61
+ sort_buffer_size = 8M
62
+ join_buffer_size = 28M
63
+ key_buffer_size = 4M
64
+
65
+ thread_cache_size = 16
66
+
67
+ query_cache_type = 1
68
+ query_cache_size = 8M
69
+ query_cache_limit = 2M
70
+
71
+ ft_min_word_len = 4
72
+
73
+ log_bin = mysql-bin
74
+ binlog_format = mixed
75
+ expire_logs_days = 30
76
+
77
+
78
+ performance_schema = 0
79
+ explicit_defaults_for_timestamp
80
+
81
+ # lower_case_table_names = 1
82
+
83
+ myisam_sort_buffer_size = 8M
84
+ myisam_repair_threads = 1
85
+
86
+ interactive_timeout = 28800
87
+ wait_timeout = 28800
88
+
89
+
90
+ # Remove leading # to set options mainly useful for reporting servers.
91
+ # The server defaults are faster for transactions and fast SELECTs.
92
+ # Adjust sizes as needed, experiment to find the optimal values.
93
+ # join_buffer_size = 128M
94
+ # sort_buffer_size = 2M
95
+ # read_rnd_buffer_size = 2M
96
+
97
+ # Disabling symbolic-links is recommended to prevent assorted security risks
98
+ symbolic-links = 0
99
+
100
+ # Recommended in standard MySQL setup
101
+ sql_mode = NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,STRICT_TRANS_TABLES
102
+
103
+ [mysqldump]
104
+ quick
105
+ max_allowed_packet = 16M
106
+
107
+ [myisamchk]
108
+ key_buffer_size = 8M
109
+ sort_buffer_size = 8M
110
+ read_buffer = 4M
111
+ write_buffer = 4M
0 commit comments