今天安装一键lnmp包,安装完之后顺利进入测试页。看到测试页有个phpMyAdmin的链接,点击试下,发现一片空白。
顺手打开终端执行mysql,很不幸,报错
root@kali:~# mysqlERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
此时博主忽然想到大神 : Lellansin's 冰森(http://www.lellansin.com/) 博客上好像有这样一篇博文,仔细阅读之,他那篇文章中所描诉的情况是磁盘被占满导致的。但是我这磁盘明显是够用的。蛋疼ing...
按照以往的经验,博主必然会选择重启。当然,这次也不例外,执行
service mysql restart
[FAIL] MySQL server PID file could not be found! ... failed!Starting MySQL[ o.
ps -ef|grep mysql
root@kali:/var/log# ps -ef|grep mysqlroot 23646 10 09:35 pts/100:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/var --pid-file=/usr/local/mysql/var/kali.pidmysql24017 236460 09:35 pts/100:00:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/var/kali.err --pid-file=/usr/local/mysql/var/kali.pid --socket=/tmp/mysql.sock --port=3306root 24059 234130 09:35 pts/100:00:00 grep mysql
root@kali:/var/log# mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
博主记录这个过程旨在说明出现
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
这个错误也有可能是mysql的进程没起来的原因。