MySQL 如何使用mysql工作台进行自动mysql数据库备份
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4532649/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to do automatic mysql db backup using mysql workbench
提问by Wern Ancheta
How to do automatic mysql db backup using mysql workbench?
如何使用mysql工作台进行自动mysql数据库备份?
Is it possible?
是否可以?
采纳答案by nathan kelly
If you have a webserver with PHP I'd suggest MySqlDumper
如果你有一个带 PHP 的网络服务器,我建议你使用MySqlDumper
It supports:
它支持:
- Automatic backups
- Emails backups
- Compresses backups
- Rotates backups
- etc.
- 自动备份
- 电子邮件备份
- 压缩备份
- 轮换备份
- 等等。
回答by ajreal
Mysql bench is not required for automatic backup,
setup a crontab and use mysqldump (or equivalent) will do the same job and is easier.
自动备份不需要 Mysql bench,
设置一个 crontab 并使用 mysqldump(或等效的)将完成相同的工作并且更容易。
example:
例子:
crontab -e
/* backup every day at 00:00:00 */
0 0 * * * mysqldump -u root -ppassword YOUR_DATABASE > /backup/YOUR_DATABASE.sql
回答by noonex
ATM scheduled backups are not plannned in Workbench: http://bugs.mysql.com/bug.php?id=50074
Workbench 中未计划 ATM 计划备份:http://bugs.mysql.com/bug.php?id=50074
At the same time Workbench is designed to have powerful scripting shell, so you can try to investigate what commands can be used for backup and call them directly from shell. (But I agree this is too general idea):
同时Workbench被设计成具有强大的脚本shell,所以你可以尝试研究一下可以使用哪些命令进行备份,并直接从shell中调用它们。(但我同意这是太笼统的想法):