[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

[mysqld_safe]
open_files_limit        = 1000000
#socket          = /var/run/mysqld/mysqld.sock
#nice            = 0

[mysqld]
bind_address            = 0.0.0.0
user                    = mysql
pid-file                = /var/run/mysqld/mysqld.pid
socket                  = /var/run/mysqld/mysqld.sock
port                    = 3306
basedir                 = /usr
datadir                 = /var/lib/mysql
default_storage_engine  = InnoDB
tmpdir                  = /tmp
sql_mode                = "NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO"
lc-messages-dir         = /usr/share/mysql
skip-external-locking
key_buffer              = 16M
max_connections         = 50000
max_user_connections    = 10000
open_files_limit        = 1000000
max_allowed_packet      = 1024M
thread_stack            = 192K
thread_cache_size       = 15000
net_read_timeout        = 300

myisam-recover          = BACKUP
query_cache_limit       = 1M
query_cache_size        = 0
general_log_file        = /var/log/mysql/mysql.log
general_log             = 0

log_error               = /var/log/mysql/err.log
slow_query_log          = 1
slow_query_log_file     = /var/log/mysql/mariadb-slow.log
long_query_time         = 120
#log-queries-not-using-indexes

log_bin                 = /var/log/mysql/mysql-bin.log
sync_binlog             = 1
binlog_format           = ROW
expire_logs_days        = 7
max_binlog_size         = 1000M
max_connect_errors      = 100000
net_read_timeout        = 60
back_log                = 2000
table_open_cache        = 20000
tmp_table_size          = 64M
max_heap_table_size     = 64M
log_slave_updates

innodb_file_per_table
innodb_strict_mode             = 0
innodb_buffer_pool_instances   = 16
innodb_log_buffer_size         = 64M
innodb_log_file_size           = 4G
innodb_buffer_pool_size        = 128G
innodb_flush_log_at_trx_commit = 0
innodb_io_capacity             = 1000
innodb_read_io_threads         = 16
innodb_write_io_threads        = 8
innodb_adaptive_hash_index     = 0
innodb_lock_wait_timeout       = 120
innodb_autoinc_lock_mode       = 2

innodb_monitor_enable   = all
performance_schema      = ON

[galera]
binlog_format=ROW
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_provider_options="gcache.size=64G"
wsrep_cluster_name="my_wsrep_cluster"
wsrep_sst_method="mariabackup"
wsrep_sst_auth=“xxx:xxxx”
wsrep_sst_donor="mariadb03"
wsrep_node_name="mariadb02"
wsrep_slave_threads=64
wsrep_on=ON

wsrep_cluster_address=gcomm://mariadb01,mariadb02,mariadb03,mariadb04
wsrep_node_address=x.x.x.x

[mysqldump]
quick
quote-names
max_allowed_packet      = 16M

[isamchk]
key_buffer              = 16M

!includedir /etc/mysql/conf.d/