How to access metadata in MySql from Java application (User does not have access to metadata ,SQLException)
When you get an error message like:
java.lang.Exception: java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with "noAccessToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.
Ans:
Please use the below connection string settings:
private Connection con;
String connectionURL = "jdbc:mysql://<ip address>:3306/<database name>?user=<username>&password=<password>&noAccessToProcedureBodies=true";
con = DriverManager.getConnection(connectionURL);
Comments