Clone Database

Trying to clone the database and find that there isn’t any quick method on phpMyAdmin or mySQL code to do the help.

Here is the steps to do so.

$ mysqldump -u root -p dbname >~/db_name.sql
$ mysql -u root -pmypassword
mysql> create database dbname_copy;
mysql> use dbname_copy;
mysql> source ~/db_name.sql;

Refer link: http://www.ivorde.ro/How_to_copy_a_mysql_database_using_mysqldump-22.html

Advertisements