phpmyadmin enable drop database statement

2019-03-09 05:38发布

I was alerted by my hosting provider that I exceed my 1000 table limit. I have a lot of databases and would like to delete more at once. Unfortunaltley they don't have a multiselect feature so I decided to use a query in phpmyadmin.

When I try something like DROP database some_name I get DROP DATABASE statements are disables

Does anyone know if it's possible to enable them or a different way to delete multiple databases?

17条回答
2楼-- · 2019-03-09 06:02

I had problems with most of these approaches.

My installation is hosted so I don't have access to the PHP config files and the PHPMyAdmin interface is not displaying the "Remove Database" section mentioned above (under the Operations Tab). The icon in the corner didn't work either.

What I realised you can do is create a stored procedure to delete your table.

Go to "Routines", "Add Routine" and create a stored procedure with the single line:

DROP DATABASE databasename

When that's created you can execute it and the database will get deleted.

查看更多
聊天终结者
3楼-- · 2019-03-09 06:03

did you try deleting the database by logging in to mySQL using SSH if you have not already..

sudo mysql -u yourmysqlusername -p (enter the password when prompted.)

mysql> SHOW DATABASES; (find your database)

mysql> USE YOURDATABSETODROP; (CHANGE THE DATABASE)

mysql> DROP DATABASE YOURDATABSETODROP; (and you are done.)

查看更多
贪生不怕死
4楼-- · 2019-03-09 06:03

Go to \wamp\apps\phpmyadmin4.1.14\libraries Open the file called "config.default.php" Go to line 653 and change $cfg['AllowUserDropDatabase'] = false; to true Restart the server to see the changes

查看更多
做自己的国王
5楼-- · 2019-03-09 06:04

Without touching any config files

If you have your phpmyadmin open, on the left side you'll see a database icon right next to your home icon( if you mouse over it - 'query window' title will pop up ), click on it and the window showed will allow you to enter the 'drop query' without touching any config files( at least i had no problems, hope it will help ).

Database button

查看更多
Juvenile、少年°
6楼-- · 2019-03-09 06:04

I had to use another icon in CPanel (Databases section / MySqlDatabases) instead of (Databases Section / phpMyAdmin).

(... since my shared web-host provider disables the DROP DATABASE command, and initially limits access to command line and config files.)

查看更多
姐就是有狂的资本
7楼-- · 2019-03-09 06:04
  1. select the database in phpadmin
  2. click the operations button
  3. show the remove database section
  4. click the Drop the database(DROP). It show the alert box.
  5. click OK.
查看更多
登录 后发表回答