Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket
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.
|
1
2
3
4
|
[root@server ~]# /etc/init.d/mysqld start
Another MySQL daemon already running with the same unix socket.
Starting mysqld: [FAILED]
|
原因
非正常的关闭/停止服务,导致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,你会发现相似例如以下日志:
|
1
2
3
4
5
6
7
8
9
|
131207
21:15:47 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld:
Can't create/write to file '/tmp/ib0h0Wt3' (Errcode: 13)
131207
21:15:47 InnoDB: Error: unable to create temporary file; errno: 13
131207
21:15:47 [ERROR] Plugin 'InnoDB' init function returned error.
131207
21:15:47 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
131207
21:15:47 [Note] Event Scheduler: Loaded 0 events
131207
21:15:47 [Note] /usr/libexec/mysqld: ready for connections.
Version:
'5.1.71' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution |
网上百度到该问题的解决的方法都是:
|
1
|
rm /var/lib/mysql/mysql.sock
|
|
1
|
<span
style="font-family: monospace;">mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak</span> |
笔者试了非常多此,发现还是启动不成功.细看log,文本末尾写着的不仅仅/var/lib/mysql/mysql.sock,还有/var/lib/mysql/mysql1.sock,/var/lib/mysql/mysql22.sock.而我的文件夹文件夹中也正好存在这些文件.于是猜想, mysql异常关闭之后,不单仅仅产生myql.sock,还有其它sock文件,我将这三个sock文件都重命名后,myql便正常启动了.
|
1
|
rm /var/lib/mysql/mysql.sock
|
|
1
|
rm
/var/lib/mysql/mysql1.sock |
|
1
|
rm
/var/lib/mysql/mysql22.sock |
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
版权声明:本文博客原创文章。博客,未经同意,不得转载。
Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket的更多相关文章
- Another MySQL daemon already running with the same unix socket的解决
问题出现: 每周一需要备份一次数据库,即从服务器MySQL导出sql文件,再导入到我机器上虚拟机的MySQL里.但是今天早上连不上,我进入控制台用#service mysqld start强行启动,报 ...
- MySQL“Another MySQL daemon already running with the same unix socket” 报错信息处理
Mysql "Another Mysql daemon already running with the same unix socket" 解决办法:rm var/lib/mys ...
- MySQL错误Another MySQL daemon already running with the same unix socket.v
etc/init.d/mysqld start 结果显示 Another MySQL daemon already running with the same unix socket.显示另一个MyS ...
- MySQL故障处理一例_Another MySQL daemon already running with the same unix socket
MySQL故障处理一例:"Another MySQL daemon already running with the same unix socket". [root@test- ...
- 启动Mysql报错:Another MySQL daemon already running with the same unix socket.
启动Mysql报错: Another MySQL daemon already running with the same unix socket. 删除如下文件即可解决 /var/lib/mysql ...
- Another mysql daemon already running with the same unix socket
在国外网站发现的解决方法. 原因多个Mysql进程使用了同一个socket. 两个方法解决: 第一个是立即关机 使用命令 shutdown -h now 关机,关机后在启动,进程就停止了. 第二个直接 ...
- MySQL错误Another MySQL daemon already running with the same unix socket
今天遇到RT这个问题后,导致数据库错误,然后在国外网站发现了一个解决方法,记录如下: 原因是:多个Mysql进程使用了同一个socket. 解决方法是:直接把mysql.sock文件改名即可.也可以删 ...
- MySQL“Another MySQL daemon already running with the same unix socket”的处理
方法一: rm var/lib/mysql/mysql.sock service mysqld start 方法二: mv /var/lib/mysql/mysql.sock /var/lib/mys ...
- Another MySQL daemon already running with the same unix socket. & ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
mysql 断电后启动失败解决 应该是mysql.sock文件还存在. 把这个文件删掉就可以了. mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.s ...
随机推荐
- 禁用viewstate
<asp:Dropdownlist/>禁用viewstate以后 public partial class _Default : System.Web.UI.Page { ...
- hdu 4507 数位dp(求和,求平方和)
http://acm.hdu.edu.cn/showproblem.php?pid=4507 Problem Description 单身! 依旧单身! 吉哥依旧单身! DS级码农吉哥依旧单身! 所以 ...
- Prime Path (poj 3126 bfs)
Language: Default Prime Path Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11703 Ac ...
- 纯后端尝试写一个前端slide插件
概述 由于项目组前端人员缺失,又赶上需要在手机端做一个slide效果的页面,所以只能自己硬着头皮上了,写的很简单,请大家不要笑话,只是拿出来分享下,大家先看下完成后的效果,如下: 过程 看了效果图是不 ...
- 代码写解压zip文件
最近项目中服务器方返回了zip文件类型的文件,在网上搜了好多资料做成一个Demo,这里用来详解一下. ZipArchive类来源于网络.还望多多交流. 1.首先添加libz.dylib框架 2.前往h ...
- JavaScript权威指南科20章 client记忆
20 client记忆 client几种形式存储的: web记忆 cookie IE userData 离线应用 web数据库 文件系统api 20.1 localStorage 和 sessionS ...
- Swift - 按钮(UIButton)的用法
1,按钮的创建 (1)按钮有下面四种类型: UIButtonType.ContactAdd:前面带“+”图标按钮,默认文字颜色为蓝色,有触摸时的高亮效果 UIButtonType.DetailDisc ...
- jsp 中对jar 包的引用
<%@ page language="java" import="你需要的带包名的类" pageEncoding="gb2312"%& ...
- Lisp的永恒之道 好文
http://www.cnblogs.com/weidagang2046/archive/2012/06/03/tao_of_lisp.html
- C++内存管理学习笔记(6)
/****************************************************************/ /* 学习是合作和分享式的! /* Auth ...