mysql 执行存储过程的权限

在应用程序中调用存储过程,出现如下错误信息:
test_procedure executed failed because : Driver requires declaration of procedure to either contain a '\nbegin' or '\n' to follow argument declaration, or SELECT privilege on mysql.proc to parse column types.
这应该是由于MySQL用户权限不足造成的。
根据上述提示,修改了mysql.proc表中test_procedure所对应记录的definer字段的值。
原值为root@localhost,后修改为当前使用的用户myuser@%。这样就没问题了。
通过上述实验,似乎说明某个存储过程只能被自己的definer调用。
但我对此十分怀疑

又使用root@localhost创建了一个简单的存储过程test_proc,然后使用myuser@localhost用户call这个过程。
此时并没有报权限不足的问题

我可能对SELECT privilege on mysql.proc to parse column types这句话没有理解清楚。
请大家不吝指教!



转自:http://bbs.chinaunix.net/thread-893451-1-1.html

猜你喜欢

转载自rd-030.iteye.com/blog/2296275
今日推荐