Skip to content

Commit f92c596

Browse files
Create my.cnf
1 parent 6039ae8 commit f92c596

File tree

1 file changed

+151
-0
lines changed

1 file changed

+151
-0
lines changed

tmp/my.cnf

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
#
2+
# The MySQL database server configuration file.
3+
#
4+
# You can copy this to one of:
5+
# - "/etc/mysql/my.cnf" to set global options,
6+
# - "~/.my.cnf" to set user-specific options.
7+
#
8+
# One can use all long options that the program supports.
9+
# Run program with --help to get a list of available options and with
10+
# --print-defaults to see which it would actually understand and use.
11+
#
12+
# For explanations see
13+
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
14+
15+
# This will be passed to all mysql clients
16+
# It has been reported that passwords should be enclosed with ticks/quotes
17+
# escpecially if they contain "#" chars...
18+
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
19+
[client]
20+
port = 3306
21+
socket = /var/run/mysqld/mysqld.sock
22+
23+
# Here is entries for some specific programs
24+
# The following values assume you have at least 32M ram
25+
26+
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
27+
[mysqld_safe]
28+
socket = /var/run/mysqld/mysqld.sock
29+
nice = 0
30+
31+
[mysqld]
32+
#
33+
# * Basic Settings
34+
#
35+
user = mysql
36+
default-storage-engine = InnoDB
37+
pid-file = /var/run/mysqld/mysqld.pid
38+
socket = /var/run/mysqld/mysqld.sock
39+
port = 3306
40+
basedir = /usr
41+
datadir = /var/lib/mysql
42+
43+
tmpdir = /tmp
44+
lc-messages-dir = /usr/share/mysql
45+
skip-external-locking
46+
skip-name-resolve
47+
sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
48+
sysdate-is-now = 1
49+
innodb = FORCE
50+
innodb-strict-mode = 1
51+
#
52+
# Instead of skip-networking the default is now to listen only on
53+
# localhost which is more compatible and is not less secure.
54+
bind-address = 127.0.0.1
55+
#
56+
# * Fine Tuning
57+
#
58+
key_buffer = 16M
59+
key-buffer-size = 32M
60+
max_allowed_packet = 16M
61+
max-connect-error = 10000000
62+
thread_stack = 192K
63+
thread_cache_size = 50
64+
open-files-limit = 65535
65+
table-definition-cache = 1024
66+
table-open-cache = 2048
67+
# This replaces the startup script and checks MyISAM tables if needed
68+
# the first time they are touched
69+
myisam-recover = FORCE,BACKUP
70+
max_connections = 5000
71+
#table_cache = 64
72+
#thread_concurrency = 10
73+
#
74+
# * Query Cache Configuration
75+
#
76+
#query_cache_limit = 1M
77+
query_cache_size = 0
78+
tmp-table-size = 32M
79+
max-heap-table-size = 32M
80+
query-cache-type = 0
81+
#
82+
# * Logging and Replication
83+
#
84+
# Both location gets rotated by the cronjob.
85+
# Be aware that this log type is a performance killer.
86+
# As of 5.1 you can enable the log at runtime!
87+
#general_log_file = /var/log/mysql/mysql.log
88+
#general_log = 1
89+
#
90+
# Error log - should be very few entries.
91+
#
92+
log_error = /var/log/mysql/error.log
93+
#
94+
# Here you can see queries with especially long duration
95+
#log_slow_queries = /var/log/mysql/mysql-slow.log
96+
#long_query_time = 2
97+
#log-queries-not-using-indexes
98+
#
99+
# The following can be used as easy to replay backup logs or for replication.
100+
# note: if you are setting up a replication slave, see README.Debian about
101+
# other settings you may need to change.
102+
#server-id = 1
103+
log_bin = /var/log/mysql/mysql-bin.log
104+
expire_logs_days = 10
105+
max_binlog_size = 100M
106+
sync-binlog = 1
107+
#binlog_do_db = include_database_name
108+
#binlog_ignore_db = include_database_name
109+
#
110+
# * InnoDB
111+
#
112+
113+
innodb-flush-method = O_DIRECT
114+
innodb-log-files-in-group = 2
115+
innodb-log-file-size = 128M
116+
innodb-flush-log-at-trx-commit = 1
117+
innodb-file-per-table = 1
118+
innodb-buffer-pool-size = 1G
119+
120+
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
121+
# Read the manual for more InnoDB related options. There are many!
122+
#
123+
# * Security Features
124+
#
125+
# Read the manual, too, if you want chroot!
126+
# chroot = /var/lib/mysql/
127+
#
128+
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
129+
#
130+
# ssl-ca=/etc/mysql/cacert.pem
131+
# ssl-cert=/etc/mysql/server-cert.pem
132+
# ssl-key=/etc/mysql/server-key.pem
133+
134+
135+
136+
[mysqldump]
137+
quick
138+
quote-names
139+
max_allowed_packet = 16M
140+
141+
[mysql]
142+
#no-auto-rehash # faster start of mysql but no tab completition
143+
144+
[isamchk]
145+
key_buffer = 16M
146+
147+
#
148+
# * IMPORTANT: Additional settings that can override those from this file!
149+
# The files must end with '.cnf', otherwise they'll be ignored.
150+
#
151+
!includedir /etc/mysql/conf.d/

0 commit comments

Comments
 (0)