Mariadb times out on startup after system reboot
These messages:

[ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired 
[ERROR] mysql.db: 1 client is using or hasn't closed the table properly


are a symptom of a crash and some MyISAM table(s) was open at the time of the crash.

The standard cure is to run

myisamchk --quick


More details: https://dev.mysql.com/doc/refman/5.7/en/myisam-table-close.html and https://dev.mysql.com/doc/refman/5.7/en/myisam-crash-recovery.html  This is reasonably fast and avoids a reinstall.

A better cure is to switch to InnoDB, since it takes care of repairing itself.