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
EXPERT
demandé il y a 5 ans2231 vues
3 réponses
0
Réponse acceptée

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
répondu il y a 5 ans
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
répondu il y a 5 mois
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.

répondu il y a 4 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions