I'm trying to run a mysqldump from inside the db service of my Docker Compose app.
Problem: Instead of dumping the file to /tmp/mydb.sql, it is printing the output to the screen.
Here is my command: docker compose exec db mysqldump -uroot mydb > /tmp/mydb.sql
There is no file in /tmp when this command is done running. I also confirmed that /tmp is writable.
How can I have the command write to /tmp/mydb.sql?