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:18

Go to the left sidebar of phpmyadmin where there is a listing of your databases and select the specific database that you want to delete.
Having done that under the menu bar where there are several options such as query, sql, operations, etc choose structure.
When you do that it will give you a listing of all the tables of the DB and right below the tables there is a checkbox choose check all and on the dropdown after that choose drop.

查看更多
来,给爷笑一个
3楼-- · 2019-03-09 06:21

PhpMyAdmin throws error “DROP DATABASE” statement is disabled”. “DROP” tab is missing in PhpMyadmin Home page. To Enable above tab in PhpMyAdmin follow below procedure.

  1. Go to XAMPP directory—–>PhpMyAdmin—–>libraries/ folder.

  2. Open/Edit file with name “config.default.php”

  3. Find $cfg['AllowUserDropDatabase']

  4. You will find it’s value is ‘False’, Make it “True” and you’re done.

  5. Refresh PhpMyAdmin Page or Restart MySql server and then open PhpMyAdmin.

查看更多
乱世女痞
4楼-- · 2019-03-09 06:22

you will need to update file config.default generally phpmyadmin's libraries folder

line 653 (may very depending on version)

$cfg['AllowUserDropDatabase'] = true;

查看更多
兄弟一词,经得起流年.
5楼-- · 2019-03-09 06:22

I was able to do without modifying any of the above mentioned files.

Step 1

click on the database icon next to home icon click on the database icon next to home icon

Step 2

on the right side of the screen select the operations tab on the right side of the screen select the operations tab

Step 3 Select the drop the database option and it should work[for me it worked even with the tables containing data
Select the drop the database option and you are done

查看更多
SAY GOODBYE
6楼-- · 2019-03-09 06:27

If this happened on a MAC, the chances are you are not running within an administrator's account; you don't have permission to delete the directory.

  1. In your finder menu bar click "go" and type the following: usr/local/mysql/data
  2. Select/delete the directory with the same database you want to drop - you will likely get the dialog asking for the admin username and password to continue.
  3. After you enter the admin credentials, the directory will be gone. Restart your session with the database and you will be good to go.

Hope this helps

查看更多
登录 后发表回答