Welcome to dbFreaks.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

preventing direct access to tables

 
   Database Help (Home) -> mySQL RSS
Next:  Software Problem  
Author Message
nobody30

External


Since: Jan 15, 2005
Posts: 15



(Msg. 1) Posted: Sat Feb 12, 2005 1:40 am
Post subject: preventing direct access to tables
Archived from groups: mailing>database>mysql (more info?)

how does one prevent someone from directly inserting into a table such
that any inserts should be passed to a stored procedure e.g
insert_data(....)

i have read the manual on revoke, grant but couldn't grasp the idea.

 >> Stay informed about: preventing direct access to tables 
Back to top
Login to vote
Bill Karwin1

External


Since: Jun 17, 2004
Posts: 42



(Msg. 2) Posted: Sat Feb 12, 2005 11:50 am
Post subject: Re: preventing direct access to tables [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

- wrote:
 > how does one prevent someone from directly inserting into a table such
 > that any inserts should be passed to a stored procedure e.g
 > insert_data(....)

As far as I can tell, MySQL does not support this. For this to work you
would need to grant INSERT privilege to the _procedure_, not to a user,
and then use GRANT EXECUTE to give the user privilege to run that procedure.

Unfortunately, the syntax documentation for GRANT shows that there is
neither support for GRANT EXECUTE, nor giving privileges to anything
besides a user. I'm guessing if they want to support this, it will
require a restructuring of the privilege tables in the system 'mysql'
database to support this.

For the time being, a MySQL stored procedure with an INSERT to a table
will fail unless the user executing the procedure has that privilege on
that table.

Regards,
Bill K.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: preventing direct access to tables 
Back to top
Login to vote
Display posts from previous:   
   Database Help (Home) -> mySQL All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]