I have installed MariaDB on Ubuntu 20.0 where Mysql was installed already. I have removed MySql before installing MariaDB. I had to run command aa-remove-unknown
and then sudo service mariadb start
only then the DB server starts. This was working fine until a server restart today.
MariaDB doesn't seem to start and I noticed the following logs
sudo service mariadb start
Failed to start mariadb.service: Unit mariadb.service has a bad unit file setting.
See system logs and 'systemctl status mariadb.service' for details.
So I did
systemctl status mariadb.service
that showed
mariadb.service: Unit configuration has fatal error, unit will not be started.
I noticed that the mysqld.sock file is missing but people say it will be created only when mariadb start and removed when server shutsdown.
I got it working only once by doing this
/etc/init.d/mysqld_safe
Upon running the above command mariadb started running and I was able to access the databases. I tried to do it again after a server restart but the command doesn't seem to start MariaDB anymore.
I have stage applications consuming databases and the development is now on hold. Your help will be greatly appreciated.
Thanks