Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to drop all table in MySQL?

Tags:

I don't want to drop database,

because I'm not hosting the website on my own machine,

drop the database will require create it again,and many settings.

Is there a command in MySQL that can be used to delete all tables in a specific database?

EDIT

Everything I can do is within a phpMyAdmin

like image 942
user198729 Avatar asked Feb 03 '10 02:02

user198729


People also ask

How delete all tables from MySQL database?

Connect to the target database. Select all tables from the left sidebar. Right-click and choose delete, or simply hit delete button. Press Cmd + S to commit changes to the server.

How do I Drop all tables in a schema?

You can select all the available tables from the right sidebar, right click and choose Delete.. , or press Delete key to drop all.


1 Answers

You were talking about doing this in phpMyAdmin.

I just had to do this and I'm not sure what version you are using but in the version I have if you scroll to the bottom of the table list you can click "Check All" and then in the drop down next to it that has "With Selected:" you can select "Drop" and it empties all the tables.

like image 53
mkly Avatar answered Sep 19 '22 18:09

mkly