-2

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.

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

1 Answers1

0

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.

Bryan
  • 7,538
  • 15
  • 68
  • 92
  • 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 00:29