I used my local mysql Docker container to dump a small and trivial test database. See:
docker exec -it [container] mysqldump -u root test > dump.sql
I'm trying to import dump.sql to a remote mysql Docker container with:
docker exec -i [container] mysql -u root -h xxx.xxx.xx.xxx -p password test < dump.sql
However it returns the help for mysql so I must have improper usage. What am I missing?
-itis not needed in when running mysqldump. The flag-tshould only be used when running interactively. Using it non-interactively could lead to a different result (for instance adding CR "carriage return")