Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have written few stored procedures and executed in my server that is having php myadmin now while calling this stored procedure from my application it is showing following exception

SQLException1 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.

While searching i find following query to resolve this exception:

GRANT SELECT,INSERT,UPDATE ON mysql.proc TO 'user'@'localhost';

my problem is that while running this query i am getting following error

#1142 - SELECT,INSERT,UP command denied to user 'qqq'@'localhost' for table 'proc'

but i have given all permission to user

 GRANT ALL ON *.* TO 'qqq'@'localhost';

So how to access stored procedure from my application I am using shared hosting server .

share|improve this question
Thanks for this! This is the first hit on Google for mysql.proc stored procedure permission, and all I needed was the command. – Dan Nissenbaum May 14 '15 at 3:00

The error you provided is generated by your driver. See this question, which points you to a blog entry giving an answer. To sum it up, you have two options:

  1. The GRANT statement you tried
  2. adding noAccessToProcedureBodies=true to your database connection string (which is also suggested by the error message)

Since you are using a shared hosting server it is likely that you don't have privileges on mysql.proc and you don't have root access to the server, so you can't GRANT them. Therefore you should try the second approach.

share|improve this answer
I also tried 2nd option String connectionURL = "jdbc:mysql://localhost:3306/database?user=user_name&password=password&noAccessT‌​oProcedureBodies=true"; and Connection c = DriverManager.getConnection(connectionURL); but still showing same error. – user2302288 Jun 26 '13 at 12:50

Following steps worked for me in mysql

Step 1 : add/edit following Connection con = DriverManager.getConnection("jdbc:mysql://ipaddress:3306/logparser?noAccessToProcedureBodies = true ", "root", "");

Step 2 : Execute following query GRANT ALL ON logparser.proc TO root@'%'; where logparser is DB name and proc is procedure name.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.