Another MySQL daemon already running with the same unix socket.

今天新安装一个LAMP环境,启动mysql时 出现以下问题:

[root@pu ~]# service  mysqld start   
Another MySQL daemon already running with the same unix socket.    
 mysqld                                                    [失败]    
[root@pu ~]# service  mysqld restart    
停止 mysqld:                                              [确定]    
Another MySQL daemon already running with the same unix socket.    
正在启动 mysqld:                                          [失败]    
[root@pu ~]# service httpd restart    
停止 httpd:                                               [确定]    
正在启动 httpd:                                           [确定]    
[root@pu ~]# service  mysqld restart    
停止 mysqld:                                              [确定]    
Another MySQL daemon already running with the same unix socket.    
正在启动 mysqld:                                          [失败]    
[root@pu ~]# reboot
Broadcast message from root@pu.com 
   (/dev/pts/0) at 20:53 ...
The system is going down for reboot NOW! 
[root@pu ~]#
Ô¶³ÌÖ÷»ú¾Ü¾

操作系统重新启动之后,也无法解决这个问题:

Last login: Thu Jan  2 20:46:53 2014 from 200.200.200.10   
[root@pu ~]# ifconfig    
eth0      Link encap:Ethernet  HWaddr 00:0C:29:DD:3D:DA  
          inet addr:200.200.200.63  Bcast:200.200.200.255  Mask:255.255.255.0    
          inet6 addr: fe80::20c:29ff:fedd:3dda/64 Scope:Link    
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1    
          RX packets:75 errors:0 dropped:0 overruns:0 frame:0    
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0    
          collisions:0 txqueuelen:1000     
          RX bytes:9369 (9.1 KiB)  TX bytes:5278 (5.1 KiB)
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0 
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
[root@pu ~]# service  mysqld restart 
停止 mysqld:                                              [确定] 
Another MySQL daemon already running with the same unix socket. 
正在启动 mysqld:                                          [失败]

正确的解决方法:

[root@pu ~]# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak
[root@pu ~]# service  mysqld start
正在启动 mysqld:                                          [确定]
[root@pu ~]# service  mysqld restart
停止 mysqld:                                              [确定]
正在启动 mysqld:                                          [确定]
点赞