mysqldump -u DB_USERNAME_HERE --password="DB_PASSWORD_HERE" --opt SCHEMA1_NAME_HERE TABLE_NAME_HERE | mysql -u root -p SCHEMA2_NAME_HERE
Be aware that this will overwrite existing tables and data which is usually exactly what you want.
To copy to a schema on a different system:
mysqldump -h HOST_IP_HERE -u DB_USERNAME_HERE --password="DB_PASSWORD_HERE" --opt SCHEMA1_NAME_HERE TABLE_NAME_HERE | mysql -u root -p SCHEMA2_NAME_HERE
0 comments:
Post a Comment