I just installed MariaDB from the debian repo and I can't start it.
root@Debian9A1:~$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/var/run/mysqld/mysqld.sock' (2)
I tried to launch the service, no success :
root@Debian9A1:/var/log/mysql# systemctl start mariadb
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
Service status is not useful :
root@Debian9A1:/var/log/mysql# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.15 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-07-22 16:28:51 CEST; 24s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 3987 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exit
juil. 22 16:28:51 Debian9A1 systemd[1]: Starting MariaDB 10.3.15 database server...
juil. 22 16:28:51 Debian9A1 systemd[1]: mariadb.service: Control process exited, code=exited status
juil. 22 16:28:51 Debian9A1 systemd[1]: Failed to start MariaDB 10.3.15 database server.
juil. 22 16:28:51 Debian9A1 systemd[1]: mariadb.service: Unit entered failed state.
juil. 22 16:28:51 Debian9A1 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Neither is journalctl :
root@Debian9A1:/var/log/mysql# journalctl -xe
[...]
juil. 22 16:28:51 Debian9A1 systemd[1]: Starting MariaDB 10.3.15 database server...
-- Subject: L'unité (unit) mariadb.service a commencé à démarrer
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- L'unité (unit) mariadb.service a commencé à démarrer.
juil. 22 16:28:51 Debian9A1 systemd[1]: mariadb.service: Control process exited, code=exited status=127
juil. 22 16:28:51 Debian9A1 systemd[1]: Failed to start MariaDB 10.3.15 database server.
-- Subject: L'unité (unit) mariadb.service a échoué
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- L'unité (unit) mariadb.service a échoué, avec le résultat failed.
juil. 22 16:28:51 Debian9A1 systemd[1]: mariadb.service: Unit entered failed state.
juil. 22 16:28:51 Debian9A1 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Finally, I don't have anything in the file /var/log/mysql/error.log
Do you have any ideas to help me troubleshoot the problem ? I already tried to reinstall all packages with :
apt-get --purge remove "mysql*"
apt-get --purge remove "mariadb*"
It was not helpful