Mysql database copy command
Create database
mysql -uroot -p CREATE DATABASE `newdb` DEFAULT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI;
Copy database
mysqldump db1 -u root -p123456 --add-drop-table | mysql newdb -u root -p123456
If different server
mysqldump db1 -uroot -p123456 --add-drop-table | mysql -h 192.168.1.22 newdb -u root -p123456