1 | [client] |
---|
2 | port = 3306 |
---|
3 | socket = /var/run/mysqld/mysqld.sock |
---|
4 | default-character-set = utf8 |
---|
5 | |
---|
6 | [mysqld] |
---|
7 | user = mysql |
---|
8 | pid-file = /var/run/mysqld/mysqld.pid |
---|
9 | socket = /var/run/mysqld/mysqld.sock |
---|
10 | port = 3306 |
---|
11 | basedir = /usr |
---|
12 | datadir = /var/lib/mysql |
---|
13 | #tmpdir = /tmp |
---|
14 | tmpdir = /run/shm/mysql |
---|
15 | default_storage_engine = InnoDB |
---|
16 | lc_messages_dir = /usr/share/mysql |
---|
17 | lc_messages = en_US |
---|
18 | character_set_server = utf8 |
---|
19 | collation_server = utf8_general_ci |
---|
20 | skip-external-locking |
---|
21 | skip-name-resolve |
---|
22 | connect_timeout = 60 |
---|
23 | #join_buffer_size = 1M |
---|
24 | #join_buffer_size = 128M |
---|
25 | join_buffer_size = 256M |
---|
26 | key_buffer = 2M |
---|
27 | #key_buffer_size = 509M |
---|
28 | key_buffer_size = 256M |
---|
29 | log_warnings = 2 |
---|
30 | max_allowed_packet = 32M |
---|
31 | max_connect_errors = 30 |
---|
32 | #max_connections = 75 |
---|
33 | #max_user_connections = 75 |
---|
34 | max_connections = 40 |
---|
35 | max_user_connections = 40 |
---|
36 | myisam_sort_buffer_size = 1024K |
---|
37 | #query_cache_limit = 128K |
---|
38 | query_cache_limit = 2M |
---|
39 | #query_cache_size = 64M |
---|
40 | query_cache_size = 768M |
---|
41 | #query_cache_size = 1024M |
---|
42 | query_cache_min_res_unit = 1K |
---|
43 | query_cache_type = 1 |
---|
44 | read_buffer_size = 8M |
---|
45 | read_rnd_buffer_size = 4M |
---|
46 | #sort_buffer_size = 128K |
---|
47 | sort_buffer_size = 512K |
---|
48 | #bulk_insert_buffer_size = 128K |
---|
49 | bulk_insert_buffer_size = 256K |
---|
50 | #table_open_cache = 64 |
---|
51 | table_open_cache = 6144 |
---|
52 | #table_definition_cache = 512 |
---|
53 | table_definition_cache = 6144 |
---|
54 | #table_cache = 128 |
---|
55 | table_cache = 20480 |
---|
56 | thread_stack = 256K |
---|
57 | thread_cache_size = 128 |
---|
58 | thread_concurrency = 8 |
---|
59 | wait_timeout = 3600 |
---|
60 | #wait_timeout = 120 |
---|
61 | #tmp_table_size = 64M |
---|
62 | tmp_table_size = 2048M |
---|
63 | #max_heap_table_size = 128M |
---|
64 | max_heap_table_size = 4096M |
---|
65 | low_priority_updates = 1 |
---|
66 | concurrent_insert = 2 |
---|
67 | #max_tmp_tables = 16384 |
---|
68 | max_tmp_tables = 32768 |
---|
69 | server-id = 8 |
---|
70 | myisam-recover = BACKUP |
---|
71 | #log_bin = /var/log/mysql/mariadb-bin |
---|
72 | #log_bin_index = /var/log/mysql/mariadb-bin.index |
---|
73 | #expire_logs_days = 1 |
---|
74 | #max_binlog_size = 100M |
---|
75 | open_files_limit = 196608 |
---|
76 | slow_query_log = 1 |
---|
77 | long_query_time = 5 |
---|
78 | slow_query_log_file = /var/log/mysql/sql-slow-query.log |
---|
79 | #log_queries_not_using_indexes |
---|
80 | log_queries_not_using_indexes |
---|
81 | |
---|
82 | |
---|
83 | # * InnoDB |
---|
84 | # |
---|
85 | # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. |
---|
86 | # Read the manual for more InnoDB related options. There are many! |
---|
87 | sql_mode = NO_ENGINE_SUBSTITUTION |
---|
88 | # you can't just change log file size, requires special procedure |
---|
89 | #innodb_log_file_size = 50M |
---|
90 | #innodb_buffer_pool_size = 509M |
---|
91 | innodb_buffer_pool_size = 1536M |
---|
92 | innodb_log_buffer_size = 4M |
---|
93 | innodb_file_per_table = 1 |
---|
94 | innodb_open_files = 256 |
---|
95 | innodb_io_capacity = 512 |
---|
96 | innodb_flush_method = O_DIRECT |
---|
97 | innodb_flush_log_at_trx_commit = 2 |
---|
98 | innodb_thread_concurrency = 8 |
---|
99 | #innodb_lazy_drop_table = 1 |
---|
100 | innodb_lock_wait_timeout = 120 |
---|
101 | |
---|
102 | |
---|
103 | [mysqld_safe] |
---|
104 | socket = /var/run/mysqld/mysqld.sock |
---|
105 | nice = 0 |
---|
106 | open_files_limit = 196608 |
---|
107 | syslog |
---|
108 | |
---|
109 | [mysqldump] |
---|
110 | quick |
---|
111 | max_allowed_packet = 32M |
---|
112 | quote-names |
---|
113 | |
---|
114 | [mysql] |
---|
115 | no-auto-rehash |
---|
116 | |
---|
117 | [myisamchk] |
---|
118 | key_buffer = 1M |
---|
119 | sort_buffer_size = 64K |
---|
120 | read_buffer = 4M |
---|
121 | write_buffer = 4M |
---|
122 | |
---|
123 | [isamchk] |
---|
124 | key_buffer = 1M |
---|
125 | sort_buffer_size = 64K |
---|
126 | read_buffer = 4M |
---|
127 | write_buffer = 4M |
---|
128 | |
---|
129 | [mysqlhotcopy] |
---|
130 | interactive-timeout |
---|
131 | |
---|
132 | !includedir /etc/mysql/conf.d/ |
---|