I have not started mysql for quite a long time , then some mistake taken when I start: mysql -uroot -p
There's no such file "/var/lib/mysql/mysql.sock" , not event in my whole disk .
I tried:
[dengwei@localhost repos1]$ sudo /etc/rc.d/init.d/mysqld start
[sudo] password for dengwei:
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
after search on web, I tried:
[dengwei@localhost ~]$ sudo /usr/bin/mysqld_safe
[sudo] password for dengwei:
130125 16:34:29 mysqld_safe Logging to '/var/log/mysqld.log'.
130125 16:34:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130125 16:37:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
now there is /tmp/mysql.sock
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
now we can run mysql via: $mysql
the rest is all about preview article