Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
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? –  Praveen Prasannan Aug 22 '13 at 7:44
    
And also what if user created a table himself. I need to give this grant to that table also –  Praveen Prasannan Aug 22 '13 at 7:46
    
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 Aug 22 '13 at 7:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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