Last 2 nights MariaDB has shut down and hasn’t come back up during the nightly /etc/webmin/package-updates/update.pl and I see these entries in the log, as if its trying to install mariadb but its already installed.
Sep 18 03:43:15 yourrentl mariadb-server-10.5.postinst[882136]: mysql.user table already exists!
Sep 18 03:43:15 yourrentl mariadb-server-10.5.postinst[882136]: Run mysql_upgrade, not mysql_install_db
Sounds like your running out of ram so the oom killer is dropping mariadb. The general concensus is to work out why your memory is being used rather than just restarting mariadb as it appearscafter 2 restarts of mariadb after an oom failure can corrupt you database. Using wordpress by any chance ?
Not sure where you’re getting that its a memory issue? There are no memory issues. Nor can I see how a memory issue would cause the /etc/webmin/package-updates/update.pl cron job to run mysql_install_db instead of mysql_upgrade (if that’s needed - the package list says its all up to date)
The cron job starts, it tells mariadb to shut down, which it does as instructed, then its running mysql_install_db which can’t run because its already installed and that’s it.
I set it to inform rather than install security updates and it didn’t turn it off last night
Sep 19 08:55:01 main.cisnetadmin.com /etc/mysql/debian-start[3211270]: Upgrading MySQL tables if necessary.
I wonder if your upgrade failed somehow. The whole thing about it not seeing the db as already existent is disturbing. Dump a current backup and force a reinstall?
My history. Provider only had a Debian 10 image. I installed that and immediately updated to 11 so my system doesn’t have much of a history. Maybe some little wrinkle across time?
EDIT: Doesn’t apt have some sort of mechanism for fixing the installed package database?