mysql 数据库集群连接配置

{
"url":"jdbc:mysql:loadbalance://10.12.*.*:3306,10.12.*.*:3306/DBName?roundRobinLoadBalance=true",
"userName":"****",
"password":"****",
"driverClassName":"com.mysql.jdbc.Driver",
"initialSize":30,
"maxTotal":300,
"minIdle":10,
"maxIdle":30,
"maxWaitMillis":3000
}

详细配置参考:

  https://www.iteye.com/blog/shift-alt-ctrl-2271730

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

 

posted @ 2021-10-13 08:49  李小加  阅读(901)  评论(0编辑  收藏  举报