6

I created a user with drop privilege to a database.

How can I create a user who has the privilege to drop tables of a specified database, but not database.

1 Answer 1

8

Do GRANT DROP ON TABLE thedatabase.* TO user1. The MySQL Reference Manual is a great place to look for this kinds of things.

3
  • There I need to specify table name. right? Suppose if there are 100 tables in a database, I need to give this 100 times. Is there any quicker method? Commented Aug 22, 2013 at 7:44
  • And also what if user created a table himself. I need to give this grant to that table also Commented Aug 22, 2013 at 7:46
  • 1
    You don't need to define that per table, I corrected the omission of the database name, but thedatabase.* stands for "all tables in database named thedatabase"
    – zagrimsan
    Commented Aug 22, 2013 at 7:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.