Skip to content

Instantly share code, notes, and snippets.

@mindreframer
Created July 25, 2012 11:29
Show Gist options
  • Save mindreframer/3175641 to your computer and use it in GitHub Desktop.
Save mindreframer/3175641 to your computer and use it in GitHub Desktop.
Install Percona Cluster

gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A gpg -a --export CD2EFD2A | sudo apt-key add -

edit /etc/apt/sources.list

deb http://repo.percona.com/apt oneiric main deb-src http://repo.percona.com/apt oneiric main

update the apt infos

apt-get update

install xtradb-cluster

sudo apt-get install percona-xtradb-cluster-client-5.5
percona-xtradb-cluster-server-5.5 percona-xtrabackup

my.cnf

############### node1 [mysqld] user=mysql

binlog_format=ROW

wsrep_provider=/usr/lib/libgalera_smm.so

ATTENTION! this is EMPTY only for initialisation! see http://www.codership.com/files/presentations/Galera_Tutorial_UC2012.pdf for further details!

wsrep_cluster_address=gcomm://

wsrep_slave_threads=2 wsrep_cluster_name=dawanda wsrep_sst_method=rsync wsrep_node_name=node1

innodb_locks_unsafe_for_binlog=1 innodb_autoinc_lock_mode=2

############ node2 [mysqld] user=mysql

binlog_format=ROW

wsrep_provider=/usr/lib/libgalera_smm.so

wsrep_cluster_address=gcomm://10.10.40.101

wsrep_slave_threads=2 wsrep_cluster_name=dawanda wsrep_sst_method=rsync wsrep_node_name=node2

innodb_locks_unsafe_for_binlog=1 innodb_autoinc_lock_mode=2

########### node3 [mysqld] user=mysql

binlog_format=ROW

wsrep_provider=/usr/lib/libgalera_smm.so

wsrep_cluster_address=gcomm://10.10.40.101

wsrep_slave_threads=2 wsrep_cluster_name=dawanda wsrep_sst_method=rsync wsrep_node_name=node3

innodb_locks_unsafe_for_binlog=1 innodb_autoinc_lock_mode=2

node1: 10.10.40.101

node2: 10.10.40.102

node3: 10.10.40.103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment