Question

Let's say I remote from my workbrench to the database which is on server now for some reason I need to have copy of the database on my another computer as a local database. How can I do that?

Was it helpful?

Solution

Export it to a single file (whatever.sql), then import it by running the script on your local computer.

There's a "Data Export" link on the left side if you connect to the remote server using MySQL Workbench. Click on that and go through the export process. Then connect to your local server, click on "Data Import/Restore", and choose the file you just saved.

OTHER TIPS

First export data from database, then import database or specific table import in local server.

$ mysqldump -u [uname] -p[pass] [dbname] > [backupfile.sql]

To dump all MySQL databases on the system, use the --all-databases shortcut:

$ mysqldump -u root -p --all-databases > [backupfile.sql]

Source :How to Copy (Backup) a MySQL Database

In addition to a dump and restore you can try the MySQL Workbench migration module which allows to migrate from MySQL to MySQL (useful for instance to upgrade from a previous version or to copy a schema, as in your case).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top