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 ...
随机推荐
- Swift Swift语言Storyboard教程:第二部
本文由CocoaChina翻译小组@TurtleFromMars翻译自raywenderlich,原文:Storyboards Tutorial in Swift: Part 2 更新记录:该Stor ...
- redis 获取key 过期时间
<pre name="code" class="html">127.0.0.1:6379> keys *b4f107c6-e96c-4a1e- ...
- C++内存管理学习笔记(5)
/****************************************************************/ /* 学习是合作和分享式的! /* Auth ...
- 浅谈mapreduce程序部署
尽管我们在虚拟机client上能非常快通过shell命令,进行运行一些已经封装好实例程序,可是在应用中还是是自己敲代码,然后部署到server中去,以下,我通过程序进行浅谈一个程序的部署过程. 在启动 ...
- CodeForces Round #191 (327C) - Magic Five 等比数列求和的快速幂取模
很久以前做过此类问题..就因为太久了..这题想了很久想不出..卡在推出等比的求和公式,有除法运算,无法快速幂取模... 看到了 http://blog.csdn.net/yangshuolll/art ...
- FindWindowEx使用方法
函数功能:该函数获得一个窗体的句柄,该窗体的类名和窗体名与给定的字符串相匹配.这个函数查找子窗体,从排在给定的子窗体后面的下一个子窗体開始.在查找时不区分大写和小写. 函数原型:HWND FindWi ...
- [Cocos2d-x]Android的android.mk文件通用版本
原文地址: http://blog.ready4go.com/blog/2013/10/12/update-android-dot-mk-with-local-src-files-and-local- ...
- Android 异步链式调用设计
本文讨论一下异步链式调用的设计与实现. 考虑如下情况: 情况1: 访问网络(或其他耗时的事情).通常的做法是: 1.显示一个ProgressDialog对话框,提示用户. 2.启动工作线程来执行耗时操 ...
- jquery实现菜单功能(单击展开或者关闭)-一般应用于后台
<!doctype html> <html> <head> <meta charset="gb2312"> <title> ...
- PCI 总线学习笔记
转载请注明出处:http://blog.csdn.net/lg2lh/article/details/8042008 PCI的基本协议这里就不介绍了,由于一般的芯片协议都是集成好的,我仅仅须要大体了解 ...