Skip to content

I want to use failover mode and load balancing mode of MariaDB connector / j. #373

@nw-engineer

Description

@nw-engineer

I'm using AWS RDS (aurora).
I want to use failover mode and load balancing mode of MariaDB connector / j.

However, using the mariadb connector / j does not work as expected.

Looking at the source below, I realized that I needed to make some changes.

★Source
guice/src/main/java/org/mybatis/guice/datasource/helper/JdbcHelper.java

★Change before
 83 MariaDB("jdbc:mysql://${JDBC.host|localhost}:${JDBC.port|3306}/${JDBC.schema}", "org.mariadb.jdbc.Driver"),
★Change after
 83 MariaDB("jdbc:mysql:aurora://${JDBC.host|localhost}:${JDBC.port|3306}/${JDBC.schema}", "org.mariadb.jdbc.Driver"),

https://mariadb.com/kb/en/about-mariadb-connector-j/#failover-and-load-balancing-modes

Because there are multiple parameters, I hope I can set it later.

Is there a way?
Thank you.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions