blob: bf5f9c1777c31afc4861f668eae2fcd57605c2a2 [file] [log] [blame]
ChrisC5e9feb22017-06-21 02:38:57 -07001# Example MySQL config file for medium systems.
2#
3# This is for a system with memory 8G where MySQL plays
4# an important part, or systems up to 128M where MySQL is used together with
5# other programs (such as a web server)
6#
7# In this file, you can use all long options that a program supports.
8# If you want to know which options a program supports, run the program
9# with the "--help" option.
10
11# The following options will be passed to all MySQL clients
12##[client]
13##user = root
14##port = 3306
15##socket = //opt/app/mysql/mysql.sock
16
17# Here follows entries for some specific programs
18
19# The MySQL server
20[mysqld]
21##performance_schema
22
23slow_query_log =ON
24long_query_time =2
25slow_query_log_file =//var/lib/mysql/slow_query.log
26##basedir = //opt/app/mysql/product/mariadb-10.1.11-linux-x86_64
27##datadir = //opt/app/mysql/data
28##port = 3306
29##socket = //opt/app/mysql/mysql.sock
30skip-external-locking
31explicit_defaults_for_timestamp = true
32skip-symbolic-links
33local-infile = 0
34#ignore_db_dir=lost+found
35key_buffer_size = 16M
36max_allowed_packet = 4M
37table_open_cache = 100
38sort_buffer_size = 512K
39net_buffer_length = 8K
40read_buffer_size = 256K
41read_rnd_buffer_size = 512K
42myisam_sort_buffer_size = 8M
43max_connections = 500
44lower_case_table_names = 1
45thread_stack = 256K
46thread_cache_size = 25
47query_cache_size = 8M
48query_cache_type = 0
49query_prealloc_size = 512K
50query_cache_limit = 1M
51
52# Password validation
53##plugin-load-add=simple_password_check.so
54##simple_password_check_other_characters=0
55
56# Audit Log settings
57plugin-load-add=server_audit.so
58server_audit=FORCE_PLUS_PERMANENT
59server_audit_file_path=//var/lib/mysql/audit.log
60server_audit_file_rotate_size=50M
61server_audit_events=CONNECT,QUERY,TABLE
62server_audit_logging=on
63
64# Don't listen on a TCP/IP port at all. This can be a security enhancement,
65# if all processes that need to connect to mysqld run on the same host.
66# All interaction with mysqld must be made via Unix sockets or named pipes.
67# Note that using this option without enabling named pipes on Windows
68# (via the "enable-named-pipe" option) will render mysqld useless!
69#
70#skip-networking
71
72# Replication Master Server (default)
73# binary logging is required for replication
74##log-bin=//var/lib/mysql/mysql-bin
75
76# binary logging format - mixed recommended
77binlog_format=row
78
79# required unique id between 1 and 2^32 - 1
80# defaults to 1 if master-host is not set
81# but will not function as a master if omitted
82
83# Replication Slave (comment out master section to use this)
84#
85# To configure this host as a replication slave, you can choose between
86# two methods :
87#
88# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
89# the syntax is:
90#
91# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
92# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
93#
94# where you replace <host>, <user>, <password> by quoted strings and
95# <port> by the master's port number (3306 by default).
96#
97# Example:
98#
99# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
100# MASTER_USER='joe', MASTER_PASSWORD='secret';
101#
102# OR
103#
104# 2) Set the variables below. However, in case you choose this method, then
105# start replication for the first time (even unsuccessfully, for example
106# if you mistyped the password in master-password and the slave fails to
107# connect), the slave will create a master.info file, and any later
108# change in this file to the variables' values below will be ignored and
109# overridden by the content of the master.info file, unless you shutdown
110# the slave server, delete master.info and restart the slaver server.
111# For that reason, you may want to leave the lines below untouched
112# (commented) and instead use CHANGE MASTER TO (see above)
113#
114# required unique id between 2 and 2^32 - 1
115# (and different from the master)
116# defaults to 2 if master-host is set
117# but will not function as a slave if omitted
118#server-id = 2
119#
120# The replication master for this slave - required
121#master-host = <hostname>
122#
123# The username the slave will use for authentication when connecting
124# to the master - required
125#master-user = <username>
126#
127# The password the slave will authenticate with when connecting to
128# the master - required
129#master-password = <password>
130#
131# The port the master is listening on.
132# optional - defaults to 3306
133#master-port = <port>
134#
135# binary logging - not required for slaves, but recommended
136#log-bin=mysql-bin
137
138# Uncomment the following if you are using InnoDB tables
139##innodb_data_home_dir = //opt/app/mysql/data
140##innodb_data_file_path = ibdata1:20M:autoextend:max:32G
141##innodb_log_group_home_dir = //opt/app/mysql/iblogs
142# You can set .._buffer_pool_size up to 50 - 80 %
143# of RAM but beware of setting memory usage too high
144innodb_buffer_pool_size = 6380M
145#innodb_additional_mem_pool_size = 2M
146# Set .._log_file_size to 25 % of buffer pool size
147innodb_log_file_size = 150M
148innodb_log_files_in_group = 3
149innodb_log_buffer_size = 8M
150#innodb_flush_log_at_trx_commit = 1
151innodb_lock_wait_timeout = 50
152innodb_autoextend_increment = 100
153expire_logs_days = 8
154open_files_limit = 2000
155transaction-isolation=READ-COMMITTED
156####### Galera parameters #######
157## Galera Provider configuration
158wsrep_provider=/usr/lib/galera/libgalera_smm.so
159wsrep_provider_options="gcache.size=2G; gcache.page_size=1G"
160## Galera Cluster configuration
161wsrep_cluster_name="MSO-automated-tests-cluster"
162wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
163##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
164## Galera Synchronization configuration
165wsrep_sst_method=rsync
166#wsrep_sst_method=xtrabackup-v2
167#wsrep_sst_auth="sstuser:Mon#2o!6"
168## Galera Node configuration
169wsrep_node_name="mariadb2"
170##wsrep_node_address="192.169.3.184"
171wsrep_on=ON
172## Status notification
173#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
174#######
175
176
177[mysqldump]
178quick
179max_allowed_packet = 16M
180
181[mysql]
182no-auto-rehash
183# Remove the next comment character if you are not familiar with SQL
184#safe-updates
185
186[myisamchk]
187key_buffer_size = 20971520
188
189##[mysqlhotcopy]
190##interactive-timeout
191##[mysqld_safe]
192##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
193##log-error=//opt/app/mysql/log/mysqld.log