: PhpMyAdmin: Remove Table Drop and Empty Controls I'm not sure this is the place to post this as there are very few questions tagged phpMyAdmin; I thought of stackoverflow, but it's not really
I'm not sure this is the place to post this as there are very few questions tagged phpMyAdmin; I thought of stackoverflow, but it's not really programming. In any case, mods should feel free to move this to whatever SE site is appropriate...
I'm looking for a configuration option that would hide the Drop and Empty tabs in the Table screens. I've looked at the documentation and there are all kinds of config options, even down to letting you change the background colors of the various panes. Fun, but not as useful as controlling access to the Drop and Empty table tables would be...
Can anyone point me to where I can change this? I know I've worked on hosted servers that had those tabs hidden, so it has to be possible somehow.
More posts by @Phylliss660
3 Comments
Sorted by latest first Latest Oldest Best
Firstly, phpMyAdmin colours those tabs in red to attempt to avoid clicks, and when you click them you will either get a Javascript confirmation alert or go to another page that has the confirmation. So it's very difficult to accidentally drop an entire table.
If that's still not satisfactory I would suggest editing the CSS. You'll need to edit the file themes/original/css/theme_right.css.php (or a different folder instead of original if that's not your theme). Add this near the top, after the first PHP section:
.tabcaution { display: none; }
UPDATE: As of version 3.4.0, PHPMyAdmin appears to have removed those buttons from the main menu and they are now under the Operations page for each table.
Since you want to avoid accidentally clicking drop and empty, create a user without drop and empty privileges for accessing the database from inside phpmyadmin. That seems a bit easier than trying to remove those tabs from code.
The only way I can think of is to edit the php. I've found what looks like the code that generates those in db_structure.php (this is 3.3.7). Look for lines with the words TRUNCATE and DROP in them.
One reason that those hosted servers had them hidden could be because the database user didn't have the privileges to do that, but I can't see anything in the code to check those privileges, so maybe the hosting companies edited the php too.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.