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.

 >> Stay informed about: preventing direct access to tables 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Document MySQL Tables - I googled and found a number of tools that claim to document MySQL schema, both at the column level and the table level. If you have found any that worked well for you please let me know. Thanks, Joe

PLS HELP! - show databases and tables and columns - Hi, I just wonder if someone can help me with this: I need to create a sql script which will run when user installs/upgrades my app. User may already have the database and tables tructure setup on the server, or may not. The script needs to..

Restoring select databases/tables from an --all-databases .. - I use the --all-databases switch to backup my entire database. Sometimes there's a need to restore individual databases or tables form the backup file. What command should I use for this? Thanks, Raffi

FLUSH TABLES hangs if table is locked - Using FLUSH TABLES via the C query API mysql_query() hangs if the table is locked already. That is to say, nothing prevents me from running a LOCK TABLES twice; it won't tell me "it's already locked, don't try to run a FLUSH". Anyone know ...

Multiple Inserts across multiple tables - Hi Guys, After a bit of advice really. We have a number of tables in our database, that when a new account is created it should insert into all of them (different information) get the insert ids from all and the update the first table with all the ids....
   Database Help (Home) -> mySQL All times are: Pacific Time (US & Canada)
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 ]