My Oracle Support Banner

Mysql Connector and MySQL Server Error Code mapping (Doc ID 2673180.1)

Last updated on AUGUST 07, 2020

Applies to:

MySQL Connectors - Version 8.0 and later
Information in this document applies to any platform.

Goal

How are the error returned from the MySQL Connector/J and the server side cause of the issue mapped.


As an example if wrong credentials are used in the datasource then  the error returned is:

 

Access denied for user '<user>'@'<host>' (using password: YES)
java.sql.SQLException: Access denied for user '<user>'@'<host>'
  (using password: YES)
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)

Is there any document that list the error associated with java.sql.SQLException?
example:

java.sql.SQLException: Access denied for user
java.sql.SQLException: message a
java.sql.SQLException: message b

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.