Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:

How to copy and move mysql database

Dump all databases with SSH access

I'm setting up a new dev machine, and I have the old one sitting right next to me. I'd like to do an exact copy of all MySQL structures and data from the old machine to the new. Nothing fancy needs to happen (it's a dev machine). No replication. I don't care about "downtimes" etc.

Is there a super simple way to do this? For example, I have SSH on the old server, can I just use Nautilus, do a connect to server, and then transfer a folder over, replacing another folder with it and be done? It's the same version of MySQL on both sides. Same version of Ubuntu. Same in most respects.

share|improve this question

migrated from Sep 26 '12 at 7:22

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Iain Sep 26 '12 at 7:38

This question was marked as an exact duplicate of an existing question.

Export the database as .SQL file, and re-import it. One of the best softwares for this might be HeidiSQL. – Giant of a Lannister Sep 26 '12 at 5:15

If you've got PhpMyAdmin installed, it's very easy, as you can export the table structure and contents to a .sql file, then re-import to the new database, usnig PhpMyAdmin on the new system.

The same is possible using the shell with mysqldump to export the data and mysql to re-import to the new system.

This link should help you.

share|improve this answer
Totally appreciate the answer. Though, I was already aware of this method. I was just wondering if there is a folder that contains the databases where I could just copy it over and overwrite on the new machine. Do you have any thoughts to that end? – Mr Mikkél Sep 27 '12 at 0:29

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