List:General Discussion« Previous MessageNext Message »
From:Jim Lyons Date:March 17 2009 4:44pm
Subject:how can I make a stored procedure executable by "public"?
View as plain text  
I am writing a tracking procedure that will be inserted into every procedure
(regardless of who writes the procedure) that will insert a record into an
audit table.  This means the procedure, regardless of who writes it, must
have the permission to insert into the table.  I am going to modify the code
of the procedures once they're stored in the database and the authors of the
procedures will probably not know that I will be doing it (although it's not
really a secret) and the way they code will not be altered in any way.

I would like to write a grant command like:

grant insert on mydb.audit_table to public

but I don't see anything in the manual Is there any way that I can do this.
I know I can grant ALL privileges to a user, but I want to grant one
privilege to all users, without having to loop through the mysql.user table
and explicitly granting the insert privilege.

I guess I could put it in test, but then everyone could do anything with it,
which would not be particularly desirable.  The table should be "insert
only", not readable or updateable by anyone but the owner of "mydb".

Is there any way I can do this?

Thanks,
Jim

-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com

Thread
how can I make a stored procedure executable by "public"?Jim Lyons17 Mar
  • Re: how can I make a stored procedure executable by "public"?Claudio Nanni18 Mar
    • Re: how can I make a stored procedure executable by "public"?Jim Lyons18 Mar
      • Re: how can I make a stored procedure executable by "public"?Claudio Nanni18 Mar
        • Re: how can I make a stored procedure executable by "public"?Jim Lyons18 Mar