码迷,mamicode.com
首页 > 数据库 > 详细

JAVA调用mysql存储过程noAccessToProcedureBodies错误

时间:2017-05-17 10:22:31      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:store   mysql存储过程   metadata   .sql   过程   term   blog   drive   解决   

问题:在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;

 

JAVA调用mysql存储过程noAccessToProcedureBodies错误

标签:store   mysql存储过程   metadata   .sql   过程   term   blog   drive   解决   

原文地址:http://www.cnblogs.com/kevinlucky/p/6865720.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!