Rebuild database without reinstalling everything

Thanks for the suggestion, @techbill. No it wasn’t. I’ve been on MariaDB since forever/long time as far as I know.

@joeyk, I don’t know how it got damaged; I’ve never done anything unusual as far as I know. I do get foreign key constraint errors.

At this point I am less interested in figuring out “how it got damaged” - there are apparently no answers or solutions anyway. I am not even entirely sure which problems are connected. I am looking for the least invasive solution to restore and be able to move forward.