如何使用 MySQL Workbench 自动备份 MySQL
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13430876/
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 backup MySQL with MySQL workbench automatically
提问by Arunprasad
Guys I'm using MySQL Workbench. Is there a way to use it to backup my database automatically?
伙计们,我正在使用MySQL Workbench。有没有办法用它来自动备份我的数据库?
采纳答案by Mukus
The correct answer is There is no backup scheduling/automating optionin MySQL Workbench as of 6.2. You can do manual backup in version 6.x by clicking on DataExport under Management. See below:
正确答案是MySQL Workbench 从 6.2 开始没有备份计划/自动化选项。您可以通过单击管理下的数据导出在 6.x 版中进行手动备份。见下文:
回答by Nesim Razon
http://community.discountasp.net/showthread.php?t=11972
http://community.discountasp.net/showthread.php?t=11972
Making a backup in MySQL workbench is a pretty easy task, but it can be hard to find exactly where to do it the first time around. Typically when you're working in MySQL Workbench you will be using the SQL Development section. But in order to export a backup you have to move to the Server Administration section.
The first time through you will have to Create A New Server Instance. If you have already set up the connection parameters in the SQL Development section, you can just choose Take Parameters from Existing Database Connection.
MySQL Workbench will then test the connection.
In the "Remote Management Type" dialog, select Do not use remote management.
Create Instance Profile is just asking you for a name for the connection. You can enter whatever you'd like here.
When you make the connection in the Server Administration section you will see a notice that remote administration is disabled. But don't worry, you can still make a backup of your database.
在 MySQL 工作台中进行备份是一项非常简单的任务,但第一次很难找到确切的位置。通常,当您在 MySQL Workbench 中工作时,您将使用 SQL Development 部分。但是为了导出备份,您必须转到“服务器管理”部分。
第一次通过您将必须创建一个新的服务器实例。如果您已经在 SQL Development 部分设置了连接参数,您可以只选择 Take Parameters from Existing Database Connection。
MySQL Workbench 然后将测试连接。
在“远程管理类型”对话框中,选择不使用远程管理。
创建实例配置文件只是要求您输入连接名称。您可以在此处输入您想要的任何内容。
当您在“服务器管理”部分建立连接时,您将看到远程管理已禁用的通知。不过别担心,您仍然可以备份您的数据库。
Click the Data Dump tab to access the export utility.
Check the box for the database you want to back up
Choose Export to Self-Contained File and make sure the path is correct.
Hit the Start Export button.
Edit: I am using mysql administrator, which has schedule option. check this also:
编辑:我正在使用 mysql 管理员,它有计划选项。也检查一下:
http://www.davecolorado.com/index.php/scheduled-backup-with-mysql-administrator-on-windows/
http://www.davecolorado.com/index.php/scheduled-backup-with-mysql-administrator-on-windows/
回答by GabrielN
You can use Create Event in MySql workbench
to create automated backups. Sample code:
您可以使用 Create Event inMySql workbench
创建自动备份。示例代码:
CREATE EVENT IF NOT EXISTS test_event_01
ON SCHEDULE AT CURRENT_TIMESTAMP
DO
INSERT INTO messages(message,created_at)
VALUES('Test MySQL Event 1',NOW());
Check this link for more details: http://www.mysqltutorial.org/mysql-triggers/working-mysql-scheduled-event/
查看此链接以获取更多详细信息:http: //www.mysqltutorial.org/mysql-triggers/working-mysql-scheduled-event/