5
votes

Good evening Community,

I am in despair because I cannot install MariaDB on Debian10. There are similar Stackoverflow questions but none of them helped to solve my problem.

What I've tried:

$ sudo apt update
$ sudo apt install mariadb-server

So far no errors.

$ sudo mysql_secure_installation

Leads to:

Enter current password for root (enter for none): ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
systemmd errors

Searching for the file called "mysqld.sock" doesn't deliver results.

$ cd /etc/init.d/
$ mysqld_safe
$ sudo find / -type s | grep mysqld.sock

Doesn't deliver any results. It appears that no mysqld.sock file has been created.

Stackoverflow: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Can anybody please help me with this problem?

Thanks,

milli727


1
Check if the server is already running $ sudo systemctl status mariadb if not check the logs first.nbk

1 Answers

1
votes
systemctl stop mysql
systemctl stop mariadb
chkconfig --del mysql
systemctl disable mysql
systemctl disable mariadb
systemctl enable mariadb.service
systemctl start mariadb.service