To clone a database named database_one into ‘database_two’ in MySQL, the following command can be used:

$root@server: mysqldump database_one -u username -p > database_one.sql
$root@server: mysql database_two -u username -p < database_one.sql

where username is the username of your MySQL database.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s