When using Aurora MySQL, which JDBC driver preferred - com.mysql.jdbc.Driver OR org.mariadb.jdbc.Driver

0

Customer is moving from their on-premises Percona MySQL cluster to Aurora MySQL. They use com.mysql.jdbc.Driver as their JDBC driver in their application as client to connect with MySQL cluster. Most of our documentation [1][2] refers MariaDB Connector/J (org.mariadb.jdbc.Driver), but doesn't indicate clearly on any benefits using that OR is this the only support driver.

Please provide some insight.

[1] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Connecting.html

[2] https://aws.amazon.com/blogs/database/using-the-mariadb-jdbc-driver-with-amazon-aurora-with-mysql-compatibility/

profile pictureAWS
EXPERTE
gefragt vor 5 Jahren2229 Aufrufe
3 Antworten
0
Akzeptierte Antwort

The MariaDB JDBC driver is Aurora cluster aware (it can connect to the cluster endpoint and enumerate the cluster members for faster failover than relying on DNS switching).

Thus, it is recommended versus the stock MySQL JDBC driver.

https://aws.amazon.com/blogs/database/using-the-mariadb-jdbc-driver-with-amazon-aurora-with-mysql-compatibility/

AWS
beantwortet vor 5 Jahren
0

I suggest perhaps using the AWS JDBC driver. It is also cluster aware and advertised to failover more quickly than a standard driver. https://github.com/awslabs/aws-mysql-jdbc

BrianV
beantwortet vor 5 Monaten
0

Use the AWS Advanced JDBC wrapper as also recommended by MariaDB JDBC Driver (the accepted answer).

September 2023 update: Version 3.0.3 of the MariaDB JDBC Driver (Connector/J) no longer supports Amazon Aurora. We recommend using the AWS Advanced JDBC Wrapper Driver . The Amazon Web Services JDBC Driver has been redesigned as an advanced JDBC wrapper. This wrapper is complementary to and extends the functionality of an existing JDBC driver to help an application take advantage of the features of clustered databases such as Amazon Aurora.

beantwortet vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen