mysql执行存储过程中可能会遇到的问题
2012-03-16 17:45
411 查看
执行存储过程可能会遇到:User does not have access to metadata require
d to determine stored procedure parameter types
以下是解决的方法:http://sql.dzone.com/tips/quick-tip-grating-access-meta-
If you have root access to your MySQL database then you can simply run a query on the database to resolve the problem. What the query will do is give the specified user the needed rights on the mysql.proc table. This takes the form of the following GRANT SQL query:
GRANT [SELECT, INSERT, UPDATE] ON `mysql`.`proc` TO 'myuser'@'myhost';
That's it, after running this query on the database the above exception goes away. If however, you do not have the needed root access to run this query on the database then below is the connection string to use to get around this problem. Very simple, just add &noAccessToProcedureBodies=true to your current connection string and you are done.
String connectionURL = "jdbc:mysql://localhost:3306/mydatabase?user=myuser&password=mypassword&noAccessToProcedureBodies=true"
d to determine stored procedure parameter types
以下是解决的方法:http://sql.dzone.com/tips/quick-tip-grating-access-meta-
If you have root access to your MySQL database then you can simply run a query on the database to resolve the problem. What the query will do is give the specified user the needed rights on the mysql.proc table. This takes the form of the following GRANT SQL query:
GRANT [SELECT, INSERT, UPDATE] ON `mysql`.`proc` TO 'myuser'@'myhost';
That's it, after running this query on the database the above exception goes away. If however, you do not have the needed root access to run this query on the database then below is the connection string to use to get around this problem. Very simple, just add &noAccessToProcedureBodies=true to your current connection string and you are done.
String connectionURL = "jdbc:mysql://localhost:3306/mydatabase?user=myuser&password=mypassword&noAccessToProcedureBodies=true"
相关文章推荐
- php在执行mysql存储过程后执行其他数据库操作问题解决方法
- 用mysql写存储过程中遇到的问题
- 投票系统的Mysql存储过程遇到的一些问题.
- MySql存储过程遇到的问题
- MySql由于编码问题,存储过程执行出错。
- MySQL存储过程where条件执行失败的问题
- mysql存储过程中两个CURSOR嵌套使用遇到的有关问题
- 第一个MYSQL存储过程以及其中遇到的空格问题
- sqlServer 存储过程执行遇到的问题及解决方案
- mysql存储过程执行权限问题
- 链接服务器遇到某些存储过程不能执行的问题
- MySql学习存储过程遇到的问题
- mysql执行存储过程权限的问题
- 第一次写MySQL存储过程遇到的关于DELIMITER的问题
- mysql怎么让一个存储过程定时执行(转载)
- mysql存储过程执行时发生Error Code: 1267. Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_gener
- 解决存储过程执行快,但程序调用则执行慢的问题
- mysql存储过程执行状态判断
- c语言执行mysql存储过程后再次执行失败
- mysql存储过程执行动态sql语句并返回值