Here’s a quick way to move data from one MySQL server to another
Let source box be ServerOne, and the target box be ServerTwo. (user-names and schema names are indicative) –
- On ServerOne,
- mysqldump -u username -p db_name > data-dump.sql (provide password when asked)
- scp data-dump.sql serverTwoUsername@ServerTwo:~/
- On ServerTwo
- mysql -u username -p
- create schema schema-name;
- exit
- mysql -u username -p -h localhost schema-name < data-dump.sql
- verify
- mysql -u username -p
- use schema-name;
- show tables;
Should be done.
Kj [/.] Sreekumar programs computers as a hobby and profession. Into programming from his school days, Sree uses Codemarvels to key in facts and fixes he finds interesting while working on different projects. Some of the articles here give away a few shades of his philosophical leanings too.