If your system is not completely dead (i.e. MySQL service can be started):
1) Boot from rescue media
2) Mount your system disk
mount /dev/sdX /mnt/tmp
3) Mount virtual filesystems
mount -o bind /dev /mnt/tmp/dev mount -t proc proc /mnt/tmp/proc mount -t sysfs sys /mnt/tmp/sys
4) Change root
chroot /mnt/tmp
5) When you're in chroot'ed environment, start MySQL service
/etc/init.d/mysql start
6) Make db backup as you do it normally
Don't forget to check your backup before formatting; you can also backup raw MySQL db files, backups never hurt.