5

I just upgraded from 10.04 to 12.04.

Now, when I try to drop a database in phpmyadmin it gives me an error saying that DROP DATABASE statements are disabled.

After reading up on this I added this line

$cfg['AllowUserDropDatabase'] = true;

to the bottom of /etc/phpmyadmin/config.inc.php, but I still get the same message.

I logged out of phpmyadmin, rebooted and logged back in, but still no change.

Any ideas?

UPDATE:

OK, I have discovered a few more details:

  • I can drop a database from PHPMyadmin by clicking on the DROP link. I can not, however, drop by typing the SQL directly.
  • I can drop a database from the command prompt, no problems
  • There is one particular database that seems to be screwed up. If I try to DROP from the command prompt, it says it has lost connection to the server. If I try from within PHPMyadmin, it errors out and logs me out instantly.
1

3 Answers 3

3

if you are using version 4+ then you can simply drop a database just following these steps:

  1. go to mysql admin
  2. click database option (right side of your databases)
  3. here you will get all the databases you have and now click the checkbox at the left side of the databases you want to delete
  4. just the bottom of these databases you can see the option "Drop" so click the drop to delete the database permanently
2

You will need to update file

config.default

generally phpmyadmin's libraries folder

line 653 (may very depending on version)

$cfg['AllowUserDropDatabase'] = true;

(restart your MySQL once the value is changed to 'true')

1

It worked for me.

  1. sudo service mysql restart

  2. Open phpmyadmin

  3. Click on Databases in the header.

  4. Marked database_to_delete.

  5. Select drop action.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .