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?
an example for Oracle (failover with 3 hosts):
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.200.40.5)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.200.40.6)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.200.40.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=OLTP.WORLD)))
Regards.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With