lopac1029 Posted March 15, 2012 Share Posted March 15, 2012 Hi there, I'm very new to mySQL, as I'm taking my first steps to changing careers from the construction industry to web development. I've gotten myself set up with a intro to php book, and I'm at the point of creating my first mySQL database. I'm working off Ubuntu 11.10, running XAMPP for Linux 1.7.7. Trying to follow my instruction book, which is asking me to delete and recreate the 'test' database that phpMyAdmin autocreates. Whenever I attempt to run the query of 'DROP DATABASE test', I get a message of '"DROP DATABASE" statements are disabled.' I've tried to find something in the settings stating where I can remove this or allow DROPs to be used, but to no avail. Can someone point me in the right direction on how to correct this? :'( *EDIT* My apologies, I forgot to put any of this that may be relevant: MySQL Server: Localhost via UNIX socket Server version: 5.5.16 Protocol version: 10 User: root@localhost MySQL charset: UTF-8 Unicode (utf8) Web server Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0c PHP/5.3.8 mod_apreq2-20090110/2.7.1 mod_perl/2.0.5 Perl/v5.10.1 MySQL client version: mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $ PHP extension: mysql phpMyAdmin Version information: 3.4.5 Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/ Share on other sites More sharing options...
Muddy_Funster Posted March 15, 2012 Share Posted March 15, 2012 sounds like a permissions issue. Has your book made you set up a new user account? Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327690 Share on other sites More sharing options...
lopac1029 Posted March 15, 2012 Author Share Posted March 15, 2012 It has not, but I assume that I'm performing as the root user, since I've been able to see all the permissions via 'permissions' tabs and change them if I wanted to. Again, this is my first foray in mySQL, but it appears to me that all the permissions are set to allow a 'DROP'. Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327694 Share on other sites More sharing options...
Muddy_Funster Posted March 15, 2012 Share Posted March 15, 2012 strange, on my xamp for windows it works fine (running from command prompt anyway). do you know how to access your mysql server through the console? could you try running your drop query from there? Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327700 Share on other sites More sharing options...
lopac1029 Posted March 15, 2012 Author Share Posted March 15, 2012 Unfortunately, I do not know how to do that (yet). I even just tried messing with the config file in phpmyadmin folder, adding what I was believing to be a solution of $cfg['AllowUserDropDatabase'] = true; but, alas, that did not work. It actually broke phpmyadmin for a moment because I changed the permissions of the file itself to be able to edit it. I'm at a bit of a loss. Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327713 Share on other sites More sharing options...
mikosiko Posted March 15, 2012 Share Posted March 15, 2012 what the "Privileges" tab shows for that table?.... try to reload the privileges and check what happens after that Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327721 Share on other sites More sharing options...
lopac1029 Posted March 15, 2012 Author Share Posted March 15, 2012 I've double checked the privileges for the currently existing 'test' database, and all seem to be in order. Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327729 Share on other sites More sharing options...
Muddy_Funster Posted March 15, 2012 Share Posted March 15, 2012 Another thing you could try would be entering this in the MyAdmin query window: CREATE DATABASE dummy; and if that works try dropping that database with DROP DATABASE dummy Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327732 Share on other sites More sharing options...
lopac1029 Posted March 15, 2012 Author Share Posted March 15, 2012 So, it created 'dummy', no problem at all there. Go to drop via query, same error message of '"DROP DATABASE" statements are disabled.' Is this possibly something with the version that I am using, where you can't use a query to DROP, and it can only be done via the 'operations' tab? Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327738 Share on other sites More sharing options...
mikosiko Posted March 15, 2012 Share Posted March 15, 2012 check you phpmyadmin configuration file... normally named config.inc.php and look for the existence and value of $cfg['AllowUserDropDatabase'] that is a boolean setting that allow/deny users to delete databases Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327748 Share on other sites More sharing options...
lopac1029 Posted March 15, 2012 Author Share Posted March 15, 2012 check you phpmyadmin configuration file... normally named config.inc.php and look for the existence and value of $cfg['AllowUserDropDatabase'] that is a boolean setting that allow/deny users to delete databases I actually already tried that, stated in reply #4. Unless you see something wrong with my code? I think I typed it correctly, but I am still a bit noob to stuff Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327752 Share on other sites More sharing options...
mikosiko Posted March 15, 2012 Share Posted March 15, 2012 sorry I didn't see that post.... did you check the config.default.php under the folder libraries too? did you try to reload the privileges from the main screen (with no db selected)? other than that you should check for any relevant configuration variable for that phpmyadmin version Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1327788 Share on other sites More sharing options...
s5058079 Posted November 20, 2012 Share Posted November 20, 2012 I know this is a bit late but i found the solution here: http://bugs.mysql.com/bug.php?id=62443 A .empty file prevents mysal from dropping a database. Quote Link to comment https://forums.phpfreaks.com/topic/258990-drop-database-statements-are-disabled-in-mysql-phpmyadminxampp-for-linux/#findComment-1393894 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.