导出命令
cat export.sql | docker exec -i {contaninerId} /usr/bin/mysql -u {account} --password={password} {databaseName}
导出示例
cat export.sql | docker exec -i 53c90e31401a /usr/bin/mysql -u root --password=12345 test_data
导入命令
docker exec {contaninerId} /usr/bin/mysqldump -u {account} --password={password} {databaseName}> export.sql
导入示例
docker exec 31ac1153513f /usr/bin/mysqldump -u root --password=12345 test_data> export.sql