I create stored procedure from mysql client terminal and e开发者_如何学JAVAverything is OK. But when I try to call it i get this error message:
ERROR 1305 (42000): PROCEDURE XXX does not exist
After that i try to create it again without
DROP PROCEDURE IF EXISTS
statement and I get this:
ERROR 1304 (42000): PROCEDURE XXX already exists
What's wrong?
*THE PROBLEM WAS THAT MY DATABASE HAVE POINT (.) IN NAME *
*EXAMPLE: 'site.db' -> THIS IS WRONG NAME OF DATABASE AND MYSQL CAN'T FIND PROCEDURE !!!*
Possibly you have problems with consistency of your system databases after incorrect upgrade or something like that. What are results for
select * from information_schema.ROUTINES where routine_name = 'xxx'
When you are define procedure using mysql client,
you could using root user (or user A).
Chances are you are using another user to call the store procedure,
let's said user B, it could causing some differences on the privileges
If this is the case, you can grant the access right
To view the current privilege, you can make use of this command
show procedure status;
精彩评论