Percona XtraDB Cluster with python3 mysql

Percona XtraDB Cluster

# aptitude install curl rsync
# curl http://www.percona.com/downloads/RPM-GPG-KEY-percona | apt-key add -

insert /etc/apt/sources.list

deb http://repo.percona.com/apt squeeze main

# aptitude update
# aptitude install percona-xtradb-cluster-client-5.5 percona-xtradb-cluster-server-5.5 percona-xtrabackup

insert /etc/mysql/my.cnf

[mysqld]
binlog_format=ROW
wsrep_provider=/usr/lib64/libgalera_smm.so
wsrep_cluster_address=gcomm://
wsrep_slave_threads=2
wsrep_cluster_name=xtradbClusterTest
wsrep_sst_method=rsync
wsrep_node_name=node1
innodb_locks_unsafe_for_binlog=1
innodb_autoinc_lock_mode=2

/etc/init.d/mysql restart

ADD a new mysql cluster node

1. Change “wsrep_node_name” to be unique for every new node
2. Change “wsrep_cluster_address=gcomm://” to “wsrep_cluster_address=gcomm://[ip of a running node]”

copy /etc/mysql/debian.cnf from master node to new node

python3 and MySQL-python

insert /etc/apt/sources.list

# Backports repository
deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free

# aptitude update
# aptitude install python3 python3-pip libmysqlclient-dev python-dev libevent-dev
# easy_install -U distribute
# pip install MySQL-python

One response to “Percona XtraDB Cluster with python3 mysql”

  1. […] written by admin on March 1, 2013 in how-to and linux with no comments ← older posts […]