export the db1 to db1.sql
edit the db1.sql, change the header
eg.
change from
create db db1
if not existing db1;
use db1;
to
create db db2
if not existing db2;
use db2;
step 3:
import the data using normal way.
e.g.
mysql -u user1 -p db2 < db1.sql
Done!
edit the db1.sql, change the header
eg.
change from
create db db1
if not existing db1;
use db1;
to
create db db2
if not existing db2;
use db2;
step 3:
import the data using normal way.
e.g.
mysql -u user1 -p db2 < db1.sql
Done!
Comments
Post a Comment