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
26 ##basedir = //opt/app/mysql/product/mariadb-10.1.11-linux-x86_64
27 ##datadir = //opt/app/mysql/data
29 ##socket = //opt/app/mysql/mysql.sock
31 explicit_defaults_for_timestamp = true
34 #ignore_db_dir=lost+found
36 max_allowed_packet = 4M
37 table_open_cache = 100
38 sort_buffer_size = 512K
39 net_buffer_length = 8K
40 read_buffer_size = 256K
41 read_rnd_buffer_size = 512K
42 myisam_sort_buffer_size = 8M
44 lower_case_table_names = 1
46 thread_cache_size = 25
49 query_prealloc_size = 512K
50 query_cache_limit = 1M
53 ##plugin-load-add=simple_password_check.so
54 ##simple_password_check_other_characters=0
57 plugin-load-add=server_audit.so
58 server_audit=FORCE_PLUS_PERMANENT
59 server_audit_file_path=//var/lib/mysql/audit.log
60 server_audit_file_rotate_size=50M
61 server_audit_events=CONNECT,QUERY,TABLE
62 server_audit_logging=on
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!
72 # Replication Master Server (default)
73 # binary logging is required for replication
74 ##log-bin=//var/lib/mysql/mysql-bin
76 # binary logging format - mixed recommended
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
83 # Replication Slave (comment out master section to use this)
85 # To configure this host as a replication slave, you can choose between
88 # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
91 # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
92 # MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
94 # where you replace <host>, <user>, <password> by quoted strings and
95 # <port> by the master's port number (3306 by default).
99 # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
100 # MASTER_USER='joe', MASTER_PASSWORD='secret';
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)
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
120 # The replication master for this slave - required
121 #master-host = <hostname>
123 # The username the slave will use for authentication when connecting
124 # to the master - required
125 #master-user = <username>
127 # The password the slave will authenticate with when connecting to
128 # the master - required
129 #master-password = <password>
131 # The port the master is listening on.
132 # optional - defaults to 3306
133 #master-port = <port>
135 # binary logging - not required for slaves, but recommended
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
144 innodb_buffer_pool_size = 6380M
145 #innodb_additional_mem_pool_size = 2M
146 # Set .._log_file_size to 25 % of buffer pool size
147 innodb_log_file_size = 150M
148 innodb_log_files_in_group = 3
149 innodb_log_buffer_size = 8M
150 #innodb_flush_log_at_trx_commit = 1
151 innodb_lock_wait_timeout = 50
152 innodb_autoextend_increment = 100
154 open_files_limit = 2000
155 transaction-isolation=READ-COMMITTED
156 ####### Galera parameters #######
157 ## Galera Provider configuration
158 wsrep_provider=/usr/lib/galera/libgalera_smm.so
159 wsrep_provider_options="gcache.size=2G; gcache.page_size=1G"
160 ## Galera Cluster configuration
161 wsrep_cluster_name="MSO-automated-tests-cluster"
162 wsrep_cluster_address="gcomm://"
163 #wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
164 ##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
165 ## Galera Synchronization configuration
166 wsrep_sst_method=rsync
167 #wsrep_sst_method=xtrabackup-v2
168 #wsrep_sst_auth="sstuser:Mon#2o!6"
169 ## Galera Node configuration
170 wsrep_node_name="mariadb1"
171 ##wsrep_node_address="192.169.3.184"
173 ## Status notification
174 #wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
180 max_allowed_packet = 16M
184 # Remove the next comment character if you are not familiar with SQL
188 key_buffer_size = 20971520
191 ##interactive-timeout
193 ##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
194 ##log-error=//opt/app/mysql/log/mysqld.log