Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

MySQL Dump

Hector edited this page Apr 29, 2015 · 1 revision

Steps to get a copy of a table in production to QA:

SSH to a production box and run the following command to export the production data to a file. The following command assumes that you logged in with your personal account and therefore the data will be saved in your home directory.

mysqldump -u user -p --opt 'NameOfProdDB' name_of_table -h my.prod.sql.host > name_of_table.out

SSH to a QA box and run the following command to import the exported data into the database.

mysql -u user -p NameOfQaDB -h my.qa.sql.host < name_of_table.out
Clone this wiki locally