/ Database

Duplicate a MySQL database

When you need to copy a production db to debug or run some tests, you need to copy template data one place to another, you will need this.

Simple one liner using mysqldbcopy CLI tool

mysqldbcopy --source=username:password@host:port --destination=username:password@host:port from_db_name:to_db_name --drop-first

Comments are welcomed!

mimimi

mimimi

Currently a Computer Engineering student at the National University of Singapore, passionate about software engineering. Contact me: info at mimimi.fun

Read More
Duplicate a MySQL database
Share this