MySQL privileges - DROP tables, not databases

Posted by Michal M on Server Fault See other posts from Server Fault or by Michal M
Published on 2010-05-27T07:49:16Z Indexed on 2010/05/27 7:52 UTC
Read the original article Hit count: 436

Hi,

Can someone help me with privileges here. I need to create a user that can DROP tables within databases but cannot DROP the databases?

From what I understand from MySQL docs you cannot simply do this:

The DROP privilege enables you to drop (remove) existing databases, tables, and views. Beginning with MySQL 5.1.10, the DROP privilege is also required in order to use the statement ALTER TABLE ... DROP PARTITION on a partitioned table. Beginning with MySQL 5.1.16, the DROP privilege is required for TRUNCATE TABLE (before that, TRUNCATE TABLE requires the DELETE privilege).

Any ideas?

© Server Fault or respective owner

Related posts about mysql

Related posts about database-adminstration