6

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


milli727
  • 63
  • 1
  • 1
  • 5
  • Check if the server is already running $ sudo systemctl status mariadb if not check the logs first. – nbk Jan 27 '20 at 16:25
  • @nbk "System has not been booted with systemd as init system (PID 1). Can't operate." – xehpuk Oct 07 '21 at 10:50
  • @xehpuk docker? see https://stackoverflow.com/questions/59466250/docker-system-has-not-been-booted-with-systemd-as-init-system – nbk Oct 09 '21 at 20:43
  • @nbk Nope, WSL. – xehpuk Oct 13 '21 at 21:56
  • aha, see https://stackoverflow.com/questions/52197246/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate – nbk Oct 13 '21 at 22:08

1 Answers1

-1
systemctl stop mysql
systemctl stop mariadb
chkconfig --del mysql
systemctl disable mysql
systemctl disable mariadb
systemctl enable mariadb.service
systemctl start mariadb.service
4b0
  • 21,981
  • 30
  • 95
  • 142
Hansie
  • 17
  • 1