Write a shell script with the following command for each database you want to back up and run it from cron every night.
mysqldump -h <hostname> -u <username> -p<password> <database> \
| gzip -9 > $HOME/backup/mysql/<database>.sql.gz
Make sure the backup directory actually exists in your home directory, of course.
If you want useful replies, ask smart questions.