Tag Archives: MySQL

Moving a single-instance MySQL server to MariaDB Galera Cluster

I’ve been keeping an eye on MariaDB for a while.  Since MySQL was acquired by Oracle, there have been concerns in the community about how Oracle will manage it going forward.  MariaDB is a fork of MySQL, run by some of the people who originally created MySQL, that was created to address these concerns.  It’s recently been picking up a fair amount of attention, in particular with some Linux distributions choosing to use it as a replacement for MySQL.  (This reminds me of what happened with LibreOffice a couple years back.)

Anyway, I work with a MySQL system and I now have a need to get it running on a cluster of some sort, for scalability and redundancy.  Since MariaDB Galera Cluster appears to be a little easier to set up and more flexible than MySQL Cluster, I figured that this would be a good time to put it to the test.

The purpose of this post is to document the process that I went through getting a MySQL database moved over to MariaDB and set up in a cluster.  I hit a few snags along the way, so I figure that this could be useful to others.

Continue reading Moving a single-instance MySQL server to MariaDB Galera Cluster

MySQL, Tomcat 6, and Ubuntu 9.10: Blah

Trying to set up a JSP application on Ubuntu 9.10, using Tomcat 6 and MySQL 5.1 (both from the Ubuntu repositories).  I was getting a curious error when trying to get a connection to the MySQL database from the JDBC DriverManager:

SQLException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
SQLState: 08S01
VendorError: 0

After searching for a while and going through some solutions that didn’t work for me, I found the answer here.  I’m re-posting it because that answer is posted in Spanish.  :-P

All you have to do is open /etc/init.d/tomcat6 in your favorite text editor (as root), find the line that looks like TOMCAT6_SECURITY=yes, and change it to TOMCAT6_SECURITY=no.  Then, restart the Tomcat server (sudo service tomcat6 restart).  Ta da!!  MySQL connections are now working.

Now, there’s probably a better way to do this that doesn’t involve completely turning off “TOMCAT6_SECURITY,” but this seems fine for a small test project which is what I’m working on (it will eventually be deployed on the JBoss server).  I’ll be sure to update this post if I find it… or if you know anything, leave a note in the comments below.