MySQL can't work :can't' connect to mysqld , /var/run/mysqld/mysqld.sock'
Thanx first
i installed MySQL in Debian with two HDD(mount /usr/ in hdb). after a
month ,i remove the second Hard disk,so i have to mv the files(/usr/*)
to hda ,but some
soft eg: mysql, php(i make it done,it's because i change the
Owner of the PHP files by copying with root ),but the mysql can'nt work.
some information appear with /etc/init.d/mysql start :
->
tail /var/log/syslog :
Nov 15 17:05:02 Debian snmpd[2843]: Connection from 127.0.0.1
Nov 15 17:05:03 Debian mysqld_safe[13888]: started
Nov 15 17:05:03 Debian mysqld[13892]: 051115 17:05:03 /usr/sbin/mysqld: unknown variable 'old_passwords=1'
Nov 15 17:05:03 Debian mysqld[13892]:
Nov 15 17:05:03 Debian mysqld_safe[13894]: ended
Nov 15 17:05:10 Debian /etc/init.d/mysql[13957]: 0 processes alive and
'/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping'
resulted in
Nov 15 17:05:10 Debian /etc/init.d/mysql[13957]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Nov 15 17:05:10 Debian /etc/init.d/mysql[13957]: error: 'Can't connect
to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Nov 15 17:05:10 Debian /etc/init.d/mysql[13957]: Check that mysqld is
running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Nov 15 17:05:10 Debian /etc/init.d/mysql[13957]:
so ,i want to clean MySQL all by apt-get remove mysql-server , rm
-fR /etc/mysql/, rm -fR /var/lib/mysql ,dpkg -P mysql-server,also
remove /usr/bin/mysql*(i think these soft may not be deled by ablove
command),
after clean these,i reinstall the MySQL apt-get install mysql-server,but new problem appear:
ARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.
Starting MySQL database server: mysqld...failed.
Please take a look at the syslog.
/etc/init.d/mysql: line 102: /usr/bin/mysqladmin: there isn't this file。
oh my god! i am crazy now ,hehe.
someone said that it can be solved by chown /path/to/mysql ,but it can't work.
wait for you help. thx
--
其实阿峰不坏
Reply to: