Web Hosting Talk







View Full Version : MySQL stored procedures - granting execute


Snargleflap
02-28-2009, 09:23 AM
I've been at it for a while, but I just can't seem to get the syntax right on granting execute permission on stored procedures to my MySQL user.
I've tried to track down examples online, and tried to figure it out from the MySQL website docs, but I still can't seem to get it to work.
I'm trying to do something like this inside the MySQL Query Browser:
grant execute on *.* to 'my_username'
If I try a wildcard, I get the error 1045 - Access denied for (insert user here)
If I try it on a specific stored procedure, I get the error 1144 - Illegal GRANT/REVOKE command.
I'm an MSSQL guy, and this is my first go at using MySQL, so bear with me gang :)
Thanks for any help you can provide.

vibrokatana
02-28-2009, 02:28 PM
What user are you using to grant the permissions?

Snargleflap
02-28-2009, 06:52 PM
What user are you using to grant the permissions?
Executing a query inside of the code window in MySQL Query Browser

BlueHayes
02-28-2009, 06:59 PM
Which user are you logged in as when using MySQL query browser though? I don't use the application myself so can't tell you how to find out on there, but run this query:
status
then, look at "Current user:" :)

Snargleflap
02-28-2009, 07:04 PM
I executed "status" and it threw an error as well. Maybe query browser isn't the right place to do this? It seems very similar to MS Sql Query Analyzer, so it seems the proper place to execute commands like this.
But like I said, I'm just getting started with MySQL. I haven't had any problems yet using Administrator to build tables and such, but I'm a bit stuck at this point. I definitely want to use stored procs, so I'll keep digging, the answer is out there somewhere :)
But do directly answer your question, I'm using the only user that I created for the database.