Arunprasad
Arunprasad

Reputation: 577

How to backup MySQL with MySQL workbench automatically

Guys I'm using MySQL Workbench. Is there a way to use it to backup my database automatically?

Upvotes: 7

Views: 36554

Answers (3)

GabrielN
GabrielN

Reputation: 9

You can use Create Event in MySql workbench to create automated backups. Sample code:

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/

Upvotes: 0

Mukus
Mukus

Reputation: 5033

The correct answer is There is no backup scheduling/automating option in 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 Data Export Import

Upvotes: 7

Nesim Razon
Nesim Razon

Reputation: 9794

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.

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:

http://www.davecolorado.com/index.php/scheduled-backup-with-mysql-administrator-on-windows/

Upvotes: 1

Related Questions