In most cases, if the system log ( journalctl ) does not show what the problem is, the MariaDB error log (located in /var/lib/mysql/localhost.localdomain.err ) /var/lib/mysql/localhost.localdomain.err . Looking at this file, you usually see what the problem is.
Most often, errors that do not disappear after reinstallation mean that your data directory (default /var/lib/mysql/ ) is corrupted and you need to reinstall the database using mysql_install_db . To make sure you are doing a clean installation, delete all the files located in the data directory, and then run sudo mysql_install_db --user=mysql .
source share