Failover on MySQL JDBC connections?

梦想的初衷 提交于 2019-12-11 03:13:22

问题


I am trying to determine how i could implement a high availablity solution using the MySQL JDBC driver, it seems that there is a failover property that I can set. But I am wondering what people tend to use when implement a simple failover mechanism using MySQL and JDBC?

We are planning to have 2 front Tomcat servers connected to 2 MySQL servers.


回答1:


Even though you're asking about JDBC, I hope this helps you understand all available options...

I typically handle failover by using a load balanced configuration that can gracefully failover, rather than at the JDBC layer.

MySQL Proxy is one way to accomplish that:

http://www.cyberciti.biz/tips/mysql-proxy-howto.html



来源:https://stackoverflow.com/questions/6711301/failover-on-mysql-jdbc-connections

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!