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
专家
已提问 5 年前2231 查看次数
3 回答
0
已接受的回答

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
已回答 5 年前
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
已回答 5 个月前
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.

已回答 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则