How to dump MariaDB database to my local machine?

Hi… It shouldn’t actually be necessary to modify fly.toml for this. That’s because flyctl can bridge the MariaDB Machine’s port over temporarily, so it behaves as if it’s listening at localhost:13306 on your development laptop/desktop. (What’s really happening is that flyctl is shuttling packets local ↔ remote behind the scenes.) Alternatively, you can run the dump command on the Machine itself, and then download the result via SFTP.

I admittedly don’t know MySQL itself that well, but here’s how that looks with Postgres:

https://community.fly.io/t/pg-dump-always-gets-interrupted-while-backing-up-postgres-db/23842

And here are some MySQL-specific tips for the bridging way:

https://fly.io/docs/app-guides/mysql-on-fly/#access-the-database-from-outside

(Note that you leave flyctl proxy running for as long as you need the connection. This surprises many people.)

Finally, separating the web-app from the database has many advantages and one near-necessity on the Fly.io platform: single-volume deployments are unusually risky here. If you’re taking regular backups and can afford to lose all the writes that occurred in the interim, then you may be ok(-ish), but many people have been unpleasantly surprised to find that they’ve lost entire databases, permanently…