copy database structure without data in mysql (with empty tables)

前端 未结 6 1226
醉酒成梦
醉酒成梦 2021-01-31 02:36

Is there any way to copy database structure without data in MySQL, so the new database will be the same as it is copied from, but with empty tables.

After getting some s

6条回答
  •  再見小時候
    2021-01-31 03:11

    Try this one:

    $ mysqldump --no-data -h localhost -u root -p database_name > imported_db_name.sql
    

提交回复
热议问题