Drop all tables in MySQL database

Answer:

MySQL does not have a command for removing all database table(s) without dropping the database, to do so, you need the following tricks:

# mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] 
| grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE]

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2021-10-01
  • 2021-12-17
  • 2022-01-24
  • 2022-02-27
  • 2021-12-02
猜你喜欢
  • 2021-07-29
  • 2022-03-03
  • 2021-08-09
  • 2022-12-23
  • 2021-11-17
  • 2022-02-01
  • 2022-12-23
相关资源
相似解决方案