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 ...
随机推荐
- 【ASP.NET Web API教程】3.3 通过WPF应用程序调用Web API(C#)
原文:[ASP.NET Web API教程]3.3 通过WPF应用程序调用Web API(C#) 注:本文是[ASP.NET Web API系列教程]的一部分,如果您是第一次看本博客文章,请先看前面的 ...
- MySQL 採用Xtrabackup对数据库进行全库备份
1,xtrabackup简单介绍 关于数据库备份以及备份工具.參考:http://blog.itpub.net/26230597/viewspace-1460065/,这里来介绍xtrabackup已 ...
- csdn发博文验证码缺陷
csdn验证码的长处: 一,差点儿没有浪费人脑人力,却要花去机器人非常多cpu csdn发博文验证码却有非常大缺陷: 一.验证码的内容终于结果是简单的数字,能够穷举尽的,也就是说不怕被封号的话全然能够 ...
- QSqlDatabase::addDatabase第一次运行的时候,生成SQLite文件的同时会产生一个默认连接
QSqlDatabase::addDatabase第一次运行的时候,生成SQLite文件的同时会产生一个默认连接: QSqlDatabase database = QSqlDatabase::addD ...
- 所有CN_消息的说明
Notification Message Corresponding WindowsConstant Message Description cn_CharToItem wm_CharToItem T ...
- 02将代码开源到github(不会使用github的来看看吧)
github不多说了,新建一个repository.如图: 这个创建好了之后,我们在eclipse中新建项目WeatherPro,安装githubclient. 安装好了之后,打开git bash,进 ...
- Codeforces Round #309 (Div. 2) C
题意: 就是给出总共同拥有k种颜色.每种颜色有ki种,排列必须满足第i+1种的最后一种颜色必须在第i种最后一种颜色的后面,其它颜色任意.总共同拥有多少种排列点的方法. 分析: 如果d[i]表示前i种的 ...
- [项目整理]Win32,MFC的可执行文件只能运行一次
//第一种方法:控制release版本的exe文件只能运行一次 #ifndef _DEBUG //debug 版本中,项目属性-->预处理器 -->预处理定义: 有_DEBUG if (F ...
- 【PostgreSQL】PostgreSQL语法
在阅读的过程中有不论什么问题.欢迎一起交流 邮箱:1494713801@qq.com QQ:1494713801 一.PostgreSQL时间类型转换 --时间类型转成字符类型 select t ...
- IM应用中的优化
以前做过IM应用中考虑过的一些关于应用优化的问题. 优化重心主要放在了电量优化和流量优化上: 电量优化 如何測试耗电量(前台耗电.后台耗电) 1.专用设备 2.性能相关的app 3.自己动手去写电量消 ...