mysql 表数据转储
For this exercise, we will use the mysqldump utility the same as if we were backing up the entire database.
在本练习中,我们将像备份整个数据库一样使用mysqldump实用程序。
Syntax:
句法:
mysqldump -d -h localhost -u root -pmypassword databasename > dumpfile.sql
mysqldump -d -h localhost -u root -pmypassword数据库名> dumpfile.sql
The only option that is different than creating an entire backup is the -d switch, which tells mysqldump not to output the data.
与创建整个备份不同的唯一选项是-d开关,它告诉mysqldump不要输出数据。
Example:
例:
mysqldump -d -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql
mysqldump -d -h localhost -u根-p2Uad7as9 database01> dumpfile.sql
翻译自: https://www.howtogeek.com/howto/programming/mysql/dump-just-the-table-structure-to-a-file-in-mysql/
mysql 表数据转储