1

I have a 3 apache2 / tomcat servers in a load balanced setup. Each tomcat server is connecting to a MySQL v5.0 database (all 3 share it).

I created on the same network a MySQL v5.5 semisynchronus setup (1 master 2 slaves) they're all up an running and contain the same DB schema as the v5.0 DB but without the data.

I need to migrate all the data from the old DB to the new Master and have the tomcat servers use the new jdbc URL to connect to the semisynchronus DB set up.

Is there a way to do this without having stop the webservers? Mainly like so ...

Put 2 webservers in maintenance mode and rout all traffic to 1 webserver. I can then change the connection pool settings on those 2. Is it then possible to do a "FLUSH TABLES WITH READ LOCK" to do a mysqldump, and then restore the data on the semisync master, then once done I enable the 2 tomcats (with updated connection pool settings) to take the incoming traffic ?

george_h
  • 113
  • 7

1 Answers1

1

No need to setup MySQL replication on the different nodes and then migrate your data. Percona has a great tool called Xtrabackup which can be used to setup a slave for replication with nearly no downtime. Give it a try.

quanta
  • 51,413
  • 19
  • 159
  • 217
  • Don't I have to pay money for that? – george_h Sep 06 '12 at 14:05
  • Sure. Percona XtraBackup is an open-source hot backup utility for MySQL... – quanta Sep 06 '12 at 15:12
  • Nice, I have Percona's "Effective MySQL" book but haven't heard of XtrBackup. I'll try it out since I don't need to purchase anything for it. I still think though I may have some downtime when backing up and restoring the DB before switching. – george_h Sep 06 '12 at 20:15