File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Failover with MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Failover with MySQL" Watch "Failover with MySQL" New topic
Author

Failover with MySQL

Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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: http://aspose.com/file-tools
 
subject: Failover with MySQL
 
Similar Threads
Cancel JDBC Connection when Browser Cancel
Regarding Connection pool
Jboss and mysql connection (failover)
VisiBroker 5.1 - NameService failover
How to prevent a MySQL slave accepting queries?