Hi all,

Sorry to bother the list, since I'm pretty sure the answer is no, but I'm trying to figure out if it's possible to prevent a user from dropping some tables in a database while allowing him/her to drop others. I've seen requests on the list for something similar, but not a solution.

Specifically, for a class, I would like to have students practice SQL using a database I've created with some tables in it. The practice includes creating and dropping tables, but I would like to prevent students from dropping my tables (or each other's I suppose, but that's optional). This problem generalizes to other permissions, e.g., to allow a user to read any table in a database except a specified one.

The permission system described in the manual indicates that the search from general to specific (user to db + host to table and column) stops if permission is granted. It doesn't seem to be possible to grant a general permission (you can drop tables), then take it back in a specific case (except not this one).

So, ideas I've come up with:

1) tell them not to drop my tables. This will work for a lab, but it's not really a solution. Still, it's probably what I'll do.

2) make a list of the table names they're allowed to create (e.g., their last names), then explicitly grant permission to drop (and create) just those. This will work, but it doesn't generalize very well.

3) put my tables in a different database that is protected, then teach them how to write queries that span databases. I think this will work, but at the expense of a bit of complexity in class.

I'm hoping that someone will have a better idea.
--

Kevin Crowston
Syracuse University Phone: +1 (315) 443-1676
School of Information Studies Fax: +1 (315) 443-5806
4-206 Centre for Science and Technology EMail: [EMAIL PROTECTED]
Syracuse, NY 13244-4100 USA Web: http://crowston.syr.edu/

---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to