How can I delete the contents of all tables in my database in phpMyAdmin without dropping the database? How can I delete the contents of all tables in my database in phpMyAdmin without dropping the database? mysql mysql

How can I delete the contents of all tables in my database in phpMyAdmin without dropping the database?


IMHO the easiest solution is:

  • In phpmyadmin select the database you want to truncate in the databases-list (left-hand-side)
  • In the main view scroll down, you'll see a checkbox "Check All" and next to it a drop-down box where you can select "Empty". Done.


Create a SQL script with multiple DELETE statements (one for each table) and execute it.

Get into phpMyAdmin and select the database that you want. Select the SQL tab and paste the SQL script into the window. Hit Go.

Look here too:

Drop all tables from a MySQL Database without deletion


We can truncate all tables data by phpMyAdmin actually!

In phpMyAdmin, you can do it as following steps:

1) select u DB and do Export operation as this way:

select Custom Export method

  • select 'Dump Table -> data' in Format-specific options
  • select 'Add DROP TABLE ... statement' in Object Creation Options.

By this step, phpMyAdmin helps us create one sql script of full list of all tables

3) do Import operation to delete and create each blank table one by one by this script

enter image description here