This question already has an answer here:

I have one remote server with MySQL databases running on it and I would like to move one database I have on my personal computer in this remote MySQL server to centralize everything.

Global configurations:

  • Personal Computer (origin): MySQL 5.7 and Ubuntu 16.04
  • Server (target): macOS El Capitan + MySQL 5.7

If I move only the database file to the new computer (using secure copy) I’m running into an error saying tables doesn’t exit but I’m still able to select the database name in the list:

 ERROR 1146 (42S02): Table ´database_name.table_name´ doesn´t exist

If I also move configurations files, I will erase existing configuration for currently running databases.

How can I merge MySQL configuration files to merge all those databases on the same device without loosing any data?

marked as duplicate by JakeGould, Pimp Juice IT, Community Sep 13 '17 at 17:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You could try exporting using mysqldump

mysqldump -u username -ppassword databasename -c >my.sql

now copy the my.sql file over, pre-create the database and import the data.

Not the answer you're looking for? Browse other questions tagged or ask your own question.