Things that do not work:
- MyISAM tables: xf_search_index, xf_session, xf_session_admin
global | |
log 127.0.0.1 local0 notice | |
user haproxy | |
group haproxy | |
defaults | |
log global | |
retries 2 | |
listen xtradb | |
bind 0.0.0.0:3306 | |
mode tcp | |
option mysql-check user haproxy_check | |
timeout queue 45s | |
timeout connect 5s | |
timeout server 1m | |
timeout client 1m | |
timeout check 10s | |
balance roundrobin | |
server xtradb1 10.130.253.154:3306 check | |
server xtradb2 10.130.253.142:3306 check | |
server xtradb3 10.130.253.146:3306 check | |
listen nginx | |
bind 0.0.0.0:80 | |
mode http | |
stats enable | |
stats uri /stats | |
timeout connect 3000 | |
timeout server 5000 | |
timeout client 5000 | |
server nginx1 10.130.253.225:80 check | |
server nginx2 10.130.254.172:80 check |
# yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm | |
# yum install -y Percona-XtraDB-Cluster-56 | |
[mysqld] | |
datadir = /var/lib/mysql | |
log_bin | |
binlog_format = ROW | |
default-storage-engine = innodb | |
innodb_buffer_pool_size = 100M | |
innodb_flush_log_at_trx_commit = 0 | |
innodb_flush_method = O_DIRECT | |
innodb_log_files_in_group = 2 | |
innodb_log_file_size = 20M | |
innodb_file_per_table = 1 | |
wsrep_cluster_address = gcomm://10.130.253.154,10.130.253.142,10.130.253.146 | |
wsrep_provider = /usr/lib64/galera3/libgalera_smm.so | |
wsrep_sst_method = xtrabackup-v2 | |
wsrep_sst_auth = "xtradb:xtradb" | |
wsrep_slave_threads = 2 | |
wsrep_cluster_name = xtradb | |
wsrep_node_name = xtradb1 | |
wsrep_node_address = 10.130.253.154 | |
innodb_locks_unsafe_for_binlog = 1 | |
innodb_autoinc_lock_mode = 2 | |
[mysqld_safe] | |
pid-file = /run/mysqld/mysql.pid | |
syslog | |
!includedir /etc/my.cnf.d |