Two hosts in jdbc url
connection-string, database-connection, java, jdbc, mysql
Solution
This is really about failover/clustering.
jdbc:mysql://192.168.29.20:3306,192.168.29.20:6306/mysql should do it. see http://lists.mysql.com/cluster/249
Reference:
- https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html
Problem
We are using jdbc url like `jdbc:mysql://localhost:3306/mysql`. How could I set second mysql host in this url? If this is imposible, how could I set in my java application (hibernate) connection to second MySQL server? Thanks! PS. actually we want to parallelize operations to two different databases. Is there any solution for that in Hibernate?