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.


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(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(

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

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



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

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