Copying MySQL databases at the command line is fast and easy

Copying your MySQL databases from the command line, if you have privileges is easy, a lot easier than going into PHP MyAdmin and hoping the “Copy Database” function is available and it doesn’t time out…

Here’s how you can copy databases to a remote server:

mysqldump your_db_name  | ssh host2 "mysql your_db_copy"

Here how you copy MySQL database to a local server:

mysqldump your_db_name | mysql your_db_copy

About Author:

Senior Cloud Software Engineer and 25+ years experienced video production, video editing and 3D animation services for a variety of global clients including local video production here in Jacksonville, Florida.

Leave a Comment

Your email address will not be published. Required fields are marked *