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
asked 4 years ago2107 views
3 Answers
0
Accepted Answer

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
answered 4 years ago
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
answered 4 months ago
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.

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions