mysql 表数据转储_在MySQL中仅将表结构转储到文件中

mysql 表数据转储

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 表数据转储

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值