Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 stackoverflow.com 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 has been asked before and already has an answer. If those answers do not fully address your question, please ask a new 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

1 Answer 1

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 A Sep 27 '12 at 0:29

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