Mysql/Galera Ubuntu 10.10 HOWTO

882 views
Skip to first unread message

Mohit Chawla

unread,
Jan 4, 2011, 8:54:36 AM1/4/11
to codership
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.

Alex Yurchenko

unread,
Jan 4, 2011, 6:14:43 PM1/4/11
to Mohit Chawla, codership
Hi Mohit,

Thanks for the nice rundown. I'm sure Ubuntu users will find it
helpful.

Best regards,
Alex

Jase

unread,
Jan 4, 2011, 6:21:08 PM1/4/11
to codership
Very helpful rundown, I am a Ubuntu user as well, and will definitely
use this, thanks,
Jase

Mohit Chawla

unread,
Jan 5, 2011, 12:26:29 AM1/5/11
to codersh...@googlegroups.com
Glad I could help.

Cheers !
Reply all
Reply to author
Forward
0 new messages