0

I have one database. I executed a stored procedure on it. I wrote some JDBC code to connect to this database. When I am calling this stored procedure from my JDBC code it is throwing SQLException.

One interesting thing I found is that I have one user other than root user. This user has all the privileges to this database where the stored procedure is present.

When I use the root user I am able to call the stored procedure successfully. But with the other user I am getting SQLexception. I am not able to find why it happens like this.

For sure I want this user(other than root) has to call this stored procedure successfully.

Thanks in advance.

3
  • I think you should provide the whole exception stacktrace, and the stored procedur. Commented Jul 1, 2010 at 11:44
  • Are you sure the user has execute proceure rights? If not try GRANT EXECUTE ON PROCEDURE mydb.myproc TO 'someuser'@'somehost'; Commented Jul 1, 2010 at 15:53
  • I'd recommend adding JDBC to your tags, I recall having trouble calling sprocs from my JDBC code before too, that's all i remember though Commented Jul 2, 2010 at 4:06

1 Answer 1

1

The user should have SELECT permissions to the mysql.proc and mysql.procs_priv.

I don't know if there exists any other solution.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.