1 # Example MySQL config file for medium systems.
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)
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.
11 # The following options will be passed to all MySQL clients
15 ##socket = //opt/app/mysql/mysql.sock
17 # Here follows entries for some specific programs
25 slow_query_log_file =//var/lib/mysql/slow_query.log
28 explicit_defaults_for_timestamp = true
32 max_allowed_packet = 4M
33 table_open_cache = 100
34 sort_buffer_size = 512K
35 net_buffer_length = 8K
36 read_buffer_size = 256K
37 read_rnd_buffer_size = 512K
38 myisam_sort_buffer_size = 8M
40 lower_case_table_names = 1
42 thread_cache_size = 25
45 query_prealloc_size = 512K
46 query_cache_limit = 1M
49 ##plugin-load-add=simple_password_check.so
50 ##simple_password_check_other_characters=0
53 plugin-load-add=server_audit.so
54 server_audit=FORCE_PLUS_PERMANENT
55 server_audit_file_path=//var/lib/mysql/audit.log
56 server_audit_file_rotate_size=50M
57 server_audit_events=CONNECT,QUERY,TABLE
58 server_audit_logging=on
60 # Don't listen on a TCP/IP port at all. This can be a security enhancement,
61 # if all processes that need to connect to mysqld run on the same host.
62 # All interaction with mysqld must be made via Unix sockets or named pipes.
63 # Note that using this option without enabling named pipes on Windows
64 # (via the "enable-named-pipe" option) will render mysqld useless!
68 # Replication Master Server (default)
69 # binary logging is required for replication
70 ##log-bin=//var/lib/mysql/mysql-bin
72 # binary logging format - mixed recommended
75 # required unique id between 1 and 2^32 - 1
76 # defaults to 1 if master-host is not set
77 # but will not function as a master if omitted
79 # Replication Slave (comment out master section to use this)
81 # To configure this host as a replication slave, you can choose between
84 # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
87 # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
88 # MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
90 # where you replace <host>, <user>, <password> by quoted strings and
91 # <port> by the master's port number (3306 by default).
95 # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
96 # MASTER_USER='joe', MASTER_PASSWORD='secret';
100 # 2) Set the variables below. However, in case you choose this method, then
101 # start replication for the first time (even unsuccessfully, for example
102 # if you mistyped the password in master-password and the slave fails to
103 # connect), the slave will create a master.info file, and any later
104 # change in this file to the variables' values below will be ignored and
105 # overridden by the content of the master.info file, unless you shutdown
106 # the slave server, delete master.info and restart the slaver server.
107 # For that reason, you may want to leave the lines below untouched
108 # (commented) and instead use CHANGE MASTER TO (see above)
110 # required unique id between 2 and 2^32 - 1
111 # (and different from the master)
112 # defaults to 2 if master-host is set
113 # but will not function as a slave if omitted
116 # The replication master for this slave - required
117 #master-host = <hostname>
119 # The username the slave will use for authentication when connecting
120 # to the master - required
121 #master-user = <username>
123 # The password the slave will authenticate with when connecting to
124 # the master - required
125 #master-password = <password>
127 # The port the master is listening on.
128 # optional - defaults to 3306
129 #master-port = <port>
131 # binary logging - not required for slaves, but recommended
134 # Uncomment the following if you are using InnoDB tables
135 ##innodb_data_home_dir = //opt/app/mysql/data
136 ##innodb_data_file_path = ibdata1:20M:autoextend:max:32G
137 ##innodb_log_group_home_dir = //opt/app/mysql/iblogs
138 # You can set .._buffer_pool_size up to 50 - 80 %
139 # of RAM but beware of setting memory usage too high
140 #innodb_buffer_pool_size = 6380M
141 #innodb_additional_mem_pool_size = 2M
142 # Set .._log_file_size to 25 % of buffer pool size
143 innodb_log_file_size = 150M
144 innodb_log_files_in_group = 3
145 innodb_log_buffer_size = 8M
146 #innodb_flush_log_at_trx_commit = 1
147 innodb_lock_wait_timeout = 50
148 innodb_autoextend_increment = 100
150 open_files_limit = 2000
151 transaction-isolation=READ-COMMITTED
152 ####### Galera parameters #######
153 ## Galera Provider configuration
154 wsrep_provider=/usr/lib/galera/libgalera_smm.so
155 wsrep_provider_options="gcache.size=1G; gcache.page_size=1G"
156 ## Galera Cluster configuration
157 wsrep_cluster_name="MSO-automated-tests-cluster"
158 wsrep_cluster_address="gcomm://"
159 #wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
160 ##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
161 ## Galera Synchronization configuration
162 wsrep_sst_method=rsync
163 #wsrep_sst_method=xtrabackup-v2
164 #wsrep_sst_auth="sstuser:Mon#2o!6"
165 ## Galera Node configuration
166 wsrep_node_name="mariadb1"
167 ##wsrep_node_address="192.169.3.184"
169 ## Status notification
170 #wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
176 max_allowed_packet = 16M
180 # Remove the next comment character if you are not familiar with SQL
184 key_buffer_size = 20971520
187 ##interactive-timeout
189 ##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
190 ##log-error=//opt/app/mysql/log/mysqld.log
192 general_log_file = /var/log/mysql/mysql.log