[英]Debian 10 MariaDB 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Good evening Community,晚安社区,
I am in despair because I cannot install MariaDB on Debian10.我很绝望,因为我无法在 Debian10 上安装 MariaDB。 There are similar Stackoverflow questions but none of them helped to solve my problem.
有类似的 Stackoverflow 问题,但没有一个有助于解决我的问题。
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)
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 errorssystemmd 错误
Searching for the file called "mysqld.sock" doesn't deliver results.搜索名为“mysqld.sock”的文件不会提供结果。
$ 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.似乎没有创建
mysqld.sock
文件。
Stackoverflow: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
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毫727
systemctl stop mysql
systemctl stop mariadb
chkconfig --del mysql
systemctl disable mysql
systemctl disable mariadb
systemctl enable mariadb.service
systemctl start mariadb.service
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.