Database Cloning

Log root account
mysql -u root -p password
 
Create a database
CREATE DATABASE `new database name` DEFAULT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI;
 
drop out
exit;
 
On the same server
Copy Database tissue to tissue_mzm
the name of the old database mysqldump -u root -p password --add-drop-table | mysql -u root -p name of the new database password
 
Not on the same server
mysqldump old database name -uroot -p password --add-drop-table | mysql -h 192.168.1.22 new database name -u root -p password

Guess you like

Origin www.cnblogs.com/nxjblog/p/10929637.html