This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Failover with MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Failover with MySQL" Watch "Failover with MySQL" New topic

Failover with MySQL

Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
If someone has implemented a failover scenario with MySQL 4.0, I'd be more than happy to hear about the details...
I have an application running on WebLogic Express 8.1, which has a "high-availability" configured multipool capable of switching to an alternative connection pool when the primary doesn't work anymore, but I'm having difficulty in figuring out how to stop the MySQL slave automatically when the master has died so that the secondary connection pool starts working (a MySQL slave can only execute SELECT queries while in slave mode so it needs to be stopped somehow).
There's always the manual option, executing "stop slave" by hand, but I would like to get a bit more swift failover functionality

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
You might want to checkout the Clustered JDBC Project. It is OSS and supports clustering a myriad of different databases including MySQL. I have no experience with it but I saw the product announcement on TSS (which probably means that you saw it too ) and I figured I would drop a note.
If you do end up using it I expect a full report.
[ February 11, 2004: Message edited by: Chris Mathews ]
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Thanks Chris!
I looked at C-JDBC some months ago and quickly abandoned it because of its status (0.x). Now that it's already a release candidate, I just might take a swing at it
(and if I will get a chance to use it, I'll sure report the experience)
I agree. Here's the link:
subject: Failover with MySQL
It's not a secret anymore!