문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top