mysql备份数据库文件_将MySQL数据库备份到文件

mysql备份数据库文件

mysql备份数据库文件

Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported.

备份数据库是一项非常重要的系统管理任务,通常应按计划的时间间隔从cron作业运行。 我们将使用mysql附带的mysqldump实用程序将数据库的内容转储到可以轻松重新导入的文本文件中。

Syntax:

句法:

mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql

mysqldump -h localhost -u根-pmypassword数据库名> dumpfile.sql

Example:

例:

mysqldump -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql

mysqldump -h localhost -u根-p2Uad7as9 database01> dumpfile.sql

This will give you a text file containing all the commands required to recreate the database.

这将为您提供一个文本文件,其中包含重新创建数据库所需的所有命令。

翻译自: https://www.howtogeek.com/howto/mysql/backup-mysql-database-to-a-file/

mysql备份数据库文件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值