JAVA调用mysql存储过程noAccessToProcedureBodies错误

问题:在JAVA中调用MYSQL存储过程遇到以下报错:

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

解决:需要有存储过程的execute的权限,还需要对mysql.proc具有访问权限。

grant select on mysql.proc to user@host;
flush privileges;

 

posted @ 2017-05-17 08:51  葫芦杯  阅读(673)  评论(0编辑  收藏  举报