I'm trying to create a stored proc in MySQL.
When I try and run it, I get the error:
Access denied for user: '<myuser>' to database '<mydb>'
However when I look at the GRANTS for this user I get:
GRANT USAGE ON *.* TO '<myuser>'@'%' IDENTIFIED BY PASSWORD '<blah>'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON `<mydb>`.* TO '<myuser>'@'%'
I can create / drop / alter tables no problem, just no joy with the stored proc.
(The database is hosted by my ISP / Web Host)
To create stored procedures you need
CREATE ROUTINE
privilege. To execute them you needEXECUTE
privilege.Check this out: http://dev.mysql.com/doc/refman/5.0/en/stored-routines-privileges.html