Last Updated: February 25, 2016
·
166
· qbraksa

Duplicate a MySQL database

Ever thought of duplicating a database for some random reason (no judging) ?! ... well here's how to do it :

mysqldump -u username –p  -d [database_name] > database.sql

mysql -u username -p 

create database [database_name] 

mysql -u username -p new_database < database