无法在centos上启动mysqld,因为我无法找到mysql.sock

你好,当我尝试启动我的 mysqld时,我收到此错误:

[root@localhost /]# service mysqld restart
Stopping mysqld:                                           [  OK  ]
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]

主要原因是my.cnf文件找不到我的mysql.sock文件.

[root@localhost /]# mysqladmin -u root -p status

mysqladmin: connect to server at 'localhost' failed

error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

当我尝试搜索时:

sudo find / -type s | grep mysqld.sock

我去拿

find: ‘/proc/3253/task/3253/fd/5’: Bestand of map bestaat niet 
find: ‘/proc/3253/task/3253/fdinfo/5’: Bestand of map bestaat niet
find: ‘/proc/3253/fd/5’: Bestand of map bestaat niet
find: ‘/proc/3253/fdinfo/5’: Bestand of map bestaat niet

"Bestand of map bestaat niet" == "File or directory don't exists"

我是新手,所以有人可以帮我吗?

太痛苦了!我偶然发现了同样的问题(在RedHat上)这对我有所帮助:

service mysqld stop
rm -rf /var/lib/mysql/*
service mysqld start
mysql_secure_installation

希望有所帮助.祝好运!

相关文章
相关标签/搜索