Loading...

JDBC 负载均衡读取mysql cluster

 

 

 

语句使用:jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]...[/[database]] »

[?propertyName1=propertyValue1[&propertyName2=propertyValue2]...]

例如:jdbc:mysql:loadbalance://ip1:port1, ip2:port2/rizhiyi_system?roundRobinLoadBalance=true

 

参考:https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-usagenotes-j2ee-concepts-managing-load-balanced-connections.html

参考:https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html

posted @ 2019-06-18 19:28  严康  阅读(2131)  评论(0编辑  收藏  举报