# mysqld_safe --skip-grant-tables &
root@jj-SFF-PC:/usr/bin# mysqld_safe --skip-grant-tables 120816 11:40:53 mysqld_safe Logging to syslog. 120816 11:40:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
root@jj-SFF-PC:/run/mysqld# 120816 13:15:02 mysqld_safe Logging to syslog. 120816 13:15:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 120816 13:16:42 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended [1]+ Done mysqld_safe --skip-grant-tables root@jj-SFF-PC:/run/mysqld#
# mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
/var/run/mysqld/mysqld.sock
find / -name mysqld
/var/run/mysqld - folder /usr/sbin/mysqld - file /run/mysqld - folder
最后,我决定卸载并重新安装MySQL。
apt-get remove mysql-server apt-get remove mysql-client apt-get remove mysql-common apt-get remove phpmyadmin
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
mysql.bad
/var/lib/mysql /var/lib/mysql/mysql /var/log/mysql /usr/lib/perl5/DBD/mysql /usr/lib/perl5/auto/DBD/mysql /usr/lib/mysql /usr/bin/mysql /usr/share/mysql /usr/share/dbconfig-common/internal/mysql /etc/init.d/mysql /etc/apparmor.d/abstractions/mysql /etc/mysql
mysql-server
mysql-client
慕无忌1623718
largeQ
森林海