Thanks for the reply timmeke
I know the basic use of mysqldump already
The thing about the step 1 is that the file will be created and left somewhere. I want the backup to be created when I access the link, which I will download at the same time and will be deleted once the download finishes. I was thinking that it could even be some kind of pipe so the file would never end up being on the disk. Not sure if that's possible.
I hope I explained myself but if not let me know and I'll do it with an example.