15 April 2013

Copy MySQL DB

You need to have (remote) access to both source and target host/database.
mysqldump -h source_host -u source_user -psource_password source_db | mysql -h target_host -u target_user -ptarget_password target_db
Note: there is no space between -psource_password or -ptarget_password

No comments:

Post a Comment