I have a desktop work computer and a home laptop. For a recent project, I needed access to the same MySQL database from both computers, as I worked on the project at both locations. The database was hosted locally on my work computer. One option would be to VPN to my work computer, but that wasn’t an attractive option for various reasons. I decided that I wanted the database hosted on both computers locally.
To move a MySQL database to another computer,
1. Open MySQL Workbench on the computer currently hosting the database.
2. Goto Server -> Data Export in the menu
3. Select the database you want to copy, and select a destination in the “Export to Self-Contained File” field.
4. Click Start Export
5. Once done exporting, transfer the dump file to the other computer
6. Open MySQL Workbench on the second computer
7. Goto Server -> Data Import in the menu
8. Select “Import from Self-Contained File” and the dump file just transferred.
9. Click Start Import.
You should be good to go. Copying multiple databases or giant databases might be trickier, but this works in most cases.