Have you looked at mysqldump???
mysqldump -u USERNAME -p DATABASENAME > /dir/to/put/file.sql
You could write out a little shell script to excecute the dump and then tar it...
#!/bin/bash
make the dump
mysqldump -u jason -pXXX jasondb > /backup/db.sql
tar it
tar -czf /backup/db.tar.gz /backup/db.sql
That's quick and rough...and assumes you are funning some form of *nix.
-- Jason