How to Automatically Backup a MySQL or MariaDB Server with MySQLDump

Databases like MySQL and MariaDB can get corrupted pretty easily, due to the fact that much of the database is stored in RAM, so a hard crash can leave entire tables completely corrupted. This is something I know first hand from experience. A disk backup or snapshot is not sufficient to backup your database!