- 代碼: 選擇全部
Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
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!
/var/log/syslog為:
- 代碼: 選擇全部
Jan 18 21:29:42 localhost /etc/init.d/mysql[570]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jan 18 21:29:42 localhost /etc/init.d/mysql[570]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jan 18 21:29:42 localhost /etc/init.d/mysql[570]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'Jan 18 21:29:42 localhost /etc/init.d/mysql[570]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
嘗試過一些方法:
1、用安全模式啟動MySQL... ...並重新設置密碼。
- 代碼: 選擇全部
Server:/# mysqld_safe --skip-grant-tables
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[872]: started
STOPPING server from pid file /var/lib/mysql/Server.pid
mysqld_safe[878]: ended
[code]
Server:/# mysqladmin -u root password "xxx"
mysqladmin: connect to server at 'localhost' failed
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!
[/code]
無效... ...
2、移除Mysql-Server
- 代碼: 選擇全部
#aptitude purge mysql-server
#rm /etc/mysql
#rm /var/lib/mysql (我當然有備份 :-D )
#aptitude install mysql-server
無效... ...
沒步數了... ...請問學長們能幫幫我嗎?