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
ESPERTO
posta 5 anni fa2231 visualizzazioni
3 Risposte
0
Risposta accettata

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
con risposta 5 anni fa
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
con risposta 5 mesi fa
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.

con risposta 4 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande