mysql PID le not found and Can't connect to MySQL
through socket mysql.sock
今天同事 A 找到我,说是 Mysql server X 的负载很高,查询很慢。他自己捣鼓了一阵未
果后,我们一起看了下。
[root@redhat var]# uname -a
Linux xxx 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64
x86_64 x86_64 GNU/Linux
[root@redhat var]# mysql -u root -p -e “select version();”
+------------+
| version() |
+------------+
| 5.1.32-log |<
+------------+
同事 A 的操作:
A 一看 mysql server 有问题第一反应是重启 mysql server,囧!!o(╯□╰)
但是又使用了错误的命令
[root@redhat var]# /var/lib/mysql/libexec/mysqld restart ----操作①
100708 14:43:53 [ERROR] Fatal error: Please read "Security" section of the
manual to nd out how to run mysqld as root!
100708 14:43:53 [ERROR] Aborting
100708 14:43:53 [Note] /var/lib/mysql/libexec/mysqld: Shutdown complete
发现问题后,他又想起来应该是用下面的命令重启
[root@redhat var]# service mysql restart ----操作②
MySQL manager or server PID le could not be found! [FAILED]
Starting MySQL......
CTRL+C 取消
这时候
[root@redhat var]# ps aux | grep mysql
可以看到,系统又启动了一个 Mysql 进程,但是过一会后,会自动消失,这时候看日志可
以发现以下错误:
100708 15:26:52 [ERROR] Can't start server: Bind on TCP/IP port: Address
already in use
100708 15:26:52 [ERROR] Do you already have another mysqld server
running on port: 30017 ?
评论0
最新资源