Search code examples
mysqldatabasephpmyadminwildcardprefix

Allow users to drop owned prefix database


Using phpMyAdmin I created a user with all permissions granted on prefixed (eg. user_db) databases. Everything works as I would want it to, except for one thing. How do I allow users to drop the prefixed databases they have permissions for? I can't seem to find where to do that, IF that's possible at all.

EDIT:

Note that the users are permitted to drop the database, I just can't seem to find where they should do that in phpMyAdmin as for example the root user would by selecting a database from the list and then clicking 'drop'.

EDIT 2:

This is how adding a user looks for me: enter image description here


Solution

  • When you select the database, on the right side panel at the top, there is a menu called "Operations", there you can find the "Drop the database (DROP)" option.

    enter image description here


    You will need to edit your config.inc.php file of your phpMyAdmin with:

    $cfg['AllowUserDropDatabase'] = TRUE;
    

    This will show the link on the operation menu like on the above image.

    Keep in mind there is a lot other options you can manually add as well that can be seen at http://wiki.phpmyadmin.net/pma/Config#AllowUserDropDatabase