Hi,
Although the target audience for Mysql/Galera project might not need
this howto per se, since the existing documentation is pretty good
anyway, but still for quickly getting started, this might be useful.
I couldn't find mysql-client version 5.1.47 in the 10.04 backports
repository, hence had to upgrade to 10.10 (which has mysql-client
5.1.49) for testing out Galera.
1. Dependencies
sudo apt-get install mysql-client-5.1 psmisc
2. Get the required Galera and Mysql/wsrep packages:
wget -c
http://launchpad.net/codership-mysql/0.7/0.7.5/+download/galera-0.7.5-i386.deb
http://launchpad.net/codership-mysql/0.7/0.7.5/+download/mysql-wsrep-5.1.47-0.7.5-i386.deb
3. Install mysql/wsrep and galera
sudo dpkg -i galera-0.7.5-i386.deb mysql-wsrep-5.1.47-0.7.5-i386.deb
4. Initial mysql configuration
start the server,
sudo /usr/bin/mysqld_safe &
and then set root password and other configuration,
/usr/bin/mysql_secure_installation
5. Configure mysql for replication
-->edit /etc/mysql/my.cnf, *commenting out* the following line
bind-address = 127.0.0.1
->edit /etc/mysql/conf.d/wsrep.conf, changing the following values:
wsrep_provider=/usr/lib/galera/libmmgalera.so
wsrep_cluster_address="gcomm://"
wsrep_sst_auth=wsrep_sst:wspass
6. Set up privileges
-> restart mysql server
->mysql -u root -p -e "SET wsrep_on=OFF; DELETE FROM mysql.user WHERE
user='';"
->mysql -u root -p -e "SET wsrep_on=OFF; GRANT ALL ON *.* TO
wsrep_sst@'%' IDENTIFIED BY 'wspass'";
7. This was for the first node, say with ip 10.5.3.101. Repeat steps
1-4 for the other node(s). In step 5, mention the cluster address as
gcomm://
10.5.3.101. Then, set up privileges like in step 6.
8. Test with your app.