Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket

原创 2014年12月22日 15:56:32

Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket

 

特征

如果你遇到如下所列的任何问题之一,本文也许能帮到你.

  • MySQL starts/stops properly when started/stopped with the mysqld service restart, but MySQL does not start when a server is rebooted.
  • After upgrading MySQL, binaries mysqld will not start at all.
  • After relocating the MySQL datadir or changing the default port, MySQL does not start.

以上所有问题有一个共同特征:你无法使用service mysqld restart/start或其他方式启动mysql.

原因

非正常的关闭/停止服务,导致mysqld的socket没有被移除. 该非正常的方式比较常见于:系统断电重启.

解决办法

There are several common cases when the socket file is not removed. Please check the below use cases and apply the appropriate resolution.

1. 查看/var/log/mysqld.log,你会发现类似如下日志:

网上百度到该问题的解决办法都是:

笔者试了很多此,发现还是启动不成功.细看log,文本末尾写着的不只/var/lib/mysql/mysql.sock,还有/var/lib/mysql/mysql1.sock,/var/lib/mysql/mysql22.sock.而我的文件夹目录中也正好存在这些文件.于是猜想, mysql异常关闭之后,不单只产生myql.sock,还有其他sock文件,我将这三个sock文件都重命名后,myql便正常启动了.

2. 总结

 mysql异常关闭时,产生的sock文件可能存在多个,要将这些sock文件都清除,mysql才能正常启动.

 

原文链接:Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket.

参考文献:http://kb.sp.parallels.com/en/119334

MySQL数据库管理

-
  • 1970年01月01日 08:00

MySQL错误Another MySQL daemon already running with the same unix socket.

 在国外网站发现的解决方法。 原因多个Mysql进程使用了同一个socket。 两个方法解决: 第一个是立即关机 使用命令 shutdown -h now 关机,关机后在启动,进程就停止了...
  • acmilanvanbasten
  • acmilanvanbasten
  • 2013-12-23 12:36:57
  • 33683

Another MySQL daemon already running with the same unix socket.

mysql 由于非正常关机,比如断电或者人为因素导致 的数据库不能启动的问题  [root@localhost ~]# service mysqld start Another MySQL dae...
  • u010154380
  • u010154380
  • 2017-04-05 15:21:42
  • 262

mysql启动报错:Another MySQL daemon already running with the same unix socket.

[root@localhost ~]#/etc/init.d/mysqld restart Stopping mysqld:                                     ...
  • u010229420
  • u010229420
  • 2016-02-19 12:01:56
  • 1794

msyql启动错误Another MySQL daemon already running with the same unix socket.

在Linux上安装完成mysql并启动时,出现如下的错误: Another MySQL daemon already running with the same unix socket. ...
  • LOVE____JAVA
  • LOVE____JAVA
  • 2015-01-12 16:55:19
  • 2938

Socket file /tmp/mysql.sock exists. Is another MySQL daemon already running with the same unix socke

[root@niejicai2 tmp]# /etc/init.d/mysqld restart Stopping mysqld:                                  ...
  • niejicai
  • niejicai
  • 2016-03-01 14:00:45
  • 1539

Socket file /var/lib/mysql/mysql.sock exists. Is another MySQL daemon already running with the same

service mysql start时提示: Socket file /var/lib/mysql/mysql.sock exists. Is another MySQL daemon alrea...
  • u012700515
  • u012700515
  • 2015-06-06 11:37:25
  • 2578

Another MySQL daemon already running with the same unix socket

解决方法:mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak
  • zlpzlr
  • zlpzlr
  • 2018-01-09 10:00:24
  • 22

/var/lib/mysql/mysql.sock错误的解决办法

问题描述: 使用mysql -uroot -p登录出现找不到 /var/lib/mysql/mysql.sock问题。 可以用如下命令登录:mysql -p --socket=/t...
  • xuechongyang
  • xuechongyang
  • 2011-11-15 16:08:33
  • 30304

MySQL启动报错Another MySQL daemon already running with the same unix socket.

现象: 因为有人直接拔了机器电源,导致MySQL所在机器直接非正常断电。 起来后,执行service mysqld status发现时stopped 所以执行service mysqld start,...
  • bxprog
  • bxprog
  • 2015-09-18 11:42:59
  • 522
收藏助手
不良信息举报
您举报文章:Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket
举报原因:
原因补充:

(最多只允许输入30个字)