Ticket #670: my.cnf.txt

File my.cnf.txt, 3.7 KB (added by chris, 3 years ago)

/etc/mysql/my.cnf

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