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

后端 未结 10 1416
予麋鹿
予麋鹿 2021-02-13 03:32

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条回答
  •  猫巷女王i
    2021-02-13 03:41

    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.

提交回复
热议问题