When you just need a simple backup of all your databases, this three lines will do the job for you.
How to use it
Just save it to a file and run it as a cron every night
00 01 * * * /srv/scripts/mysql_backup
and you get a zipped dump of every database with a timestamp.
It is easy extendable, if you want to exclude a database just write it into the grep regex
grep -Ev "(information_schema|performance_schema|another_database)"
Have fun! 🙂