MySQL copy command for different databases with host: Note running in terminal, not running on the MySQL command line.
--add-drop-table | MySQL portal_optimize-u root-ppassword1$
During the copy process, the following error occurred:
1 ERROR1153 (08S01) at line1160:got a packet bigger than'max_allowed_packet' bytes 2 mysqldump:got errno on write
Need to enlarge the max_allowed_packet in my.cnf, my machine defaults to 1M, zoom to 32M. Restart MySQL.
Ok. The above scheme is suitable for databases with small data volumes. Here is a large capacity (1G or more).
1 --Quick Portal_dev | gzip > Portal_DEV.contents.gz
Through the above command, the Portal_dev database is directed into Portal_DEV.contents.gz compressed file.
-ppassword portal_optimize
Then, with the above command, import the Portal_dev into the Portal_optimize database.
Perfect, it ' s done!!!
MySQL copy command for different database with host