Monday, February 3, 2014

MySQL High Availability (HA) tools

  • Tungsten

Tungsten Replicator is a high performance, open source, data replication engine for MySQL
https://code.google.com/p/tungsten-replicator/


  • Multi-Master Replication Manager for MySQL

MMM (Multi-Master Replication Manager for MySQL) is a set of flexible scripts to perform monitoring/failover and management of MySQL master-master replication configurations
http://mysql-mmm.org/


  • DRBD

DRBD refers to block devices designed as a building block to form high availability (HA) clusters. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based raid-1.
http://www.drbd.org/

  • Liquibase
Liquibase | Database Refactoring | Liquibase
Supports code branching and merging
Powerful refactoring commands
Command Line, Ant, Maven, Spring, and Servlet integrations
www.liquibase.org


  • I work on a Groovy/Grails project, and Grails uses Hibernate underneath for all its ORM (called "GORM")
We use Liquibase to manage all SQL schema changes, which we do fairly often as our app evolves with new features.

The awesome thing is that I can take a totally blank slate MySQL database on my laptop, fire up the app, and right away the schema is set up for me. It also makes it easy to test schema changes by applying these to a local-dev or staging DB first.

The easiest way to get started with it would probably be to take your existing DB and then use Liquibase to generate an initial baseline.xml file. Then in the future, you can just append to it and let liquibase take over managing schema changes.

http://stackoverflow.com/questions/221379/hibernate-hbm2ddl-auto-update-in-production

  • Galera Cluster for MySQL is  a true Multimaster Cluster based on synchronous replication. It is an easy-to-use, high-availability solution, which provides high system up-time, no data loss and scalability for future growth.

http://galeracluster.com/


  • Percona, a leader in open source database software and services, today announced Percona Server for MySQL 8.0, the latest version of the company’s free, enhanced, drop-in replacement for MySQL Community Edition. Percona Server for MySQL 8.0 includes all the features of MySQL Community Edition 8.0, along with enterprise-class features from Percona that make it ideal for enterprise production environments. The latest release offers increased reliability, performance and security. 

https://www.percona.com/about-percona/newsroom/press-releases/percona-server-mysql-80-delivers-increased-reliability

  • Get MySQL Replication up and running in 5 minutes

MySQL allows you to build up complex replication hierarchies, such as multi-master, chains of read slaves, backup databases at a remote site or any combination of these.
The first step in setting up replication involves editing the “my.cnf” file on the servers that will serve as the master and slave
http://www.clusterdb.com/mysql-cluster/get-mysql-replication-up-and-running-in-5-minutes/



  • How To Set Up Database Replication In MySQL

First we have to edit /etc/mysql/my.cnf. We have to enable networking for MySQL, and MySQL should listen on all IP addresses,

Furthermore we have to tell MySQL for which database it should write logs (these logs are used by the slave to see what has changed on the master), which log file it should use, and we have to specify that this MySQL server is the master. We want to replicate the database exampledb, so we put the following lines into /etc/mysql/my.cnf:

There are two possibilities to get the existing tables and data from exampledb from the master to the slave. The first one is to make a database dump, the second one is to use the LOAD DATA FROM MASTER; command on the slave. The latter has the disadvantage the the database on the master will be locked during this operation, so if you have a large database on a high-traffic production system, this is not what you want, and I recommend to follow the first method in this case. However, the latter method is very fast, so I will describe both here.

http://www.howtoforge.com/mysql_database_replication