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

后端 未结 10 2517
野趣味
野趣味 2021-02-13 03:22

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

Since I do this several times an hour while i

10条回答
  •  眼角桃花
    2021-02-13 03:40

    You could export the table structures only like this:

    mysqldump -u root -p --no-data mydb > backup_info.sql
    

    then drop the whole database, recreate it and restore from the backup.

    Easy enough to script the whole thing.

提交回复
热议问题