Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Locking a MySQL Table?
Old 02-12-2009, 11:14 AM Locking a MySQL Table?
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
Is there a way to lock / prevent one table of many tables in a MySQL database from being truncated?

I believe if I remove truncate privilages for a user, it would be the same for all the tables. But I just want to protect one table from accidently from being emptied.

Any thoughts?
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-12-2009, 11:32 AM Re: Locking a MySQL Table?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
As I understand this:
Quote:
The DROP privilege enables you to drop (remove) existing databases, tables, and views.
and:
Quote:
Privilege: DROP
Column : Drop_priv
Context :databases or tables
and with this:
http://dev.mysql.com/doc/refman/5.1/en/grant.html
http://dev.mysql.com/doc/refman/5.1/en/revoke.html

I'd say that a
Code:
revoke drop on dbName.tableName to userName;
should do it.
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 02-12-2009 at 11:36 AM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 02-13-2009, 04:44 PM Re: Locking a MySQL Table?
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
Interesting, I'm gonna have to try this. Thanks!
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Locking a MySQL Table?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.71875 seconds with 12 queries