MySQL故障处理一例_Another MySQL daemon already running with the same unix socket
MySQL故障处理一例:“Another MySQL daemon already running with the same unix socket”。
[root@test-121 sbin]# service mysqld status
mysqld 已停 [root@test-121 sbin]# service mysqld start
Another MySQL daemon already running with the same unix socket.
正在启动 mysqld: [失败] [root@test-121 sbin]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
Linux操作系统异常重启后,手动启动MySQL服务,发现无法启动,经百度发现是非正常关机造成的,MySQL有一个mysql.sock文件记录实例的运行状态,因为非正常关机,导致该文件继续存在,mysql在启动时会检查该文件,发现已经存在,那么就抛出此错误。
解决办法:
删除mysql.sock文件或者改名,重启MySQL服务后恢复正常。
[root@test-121 /]# cd /var/lib/mysql/
[root@test-121 mysql]# ls
ibdata1 ib_logfile0 ib_logfile1 mysql mysql.sock test zabbix
[root@test-121 mysql]# mv mysql.sock mysql.sock.bak
[root@test-121 mysql]# ll
总用量 233488
-rw-rw---- 1 mysql mysql 228589568 5月 9 05:57 ibdata1
-rw-rw---- 1 mysql mysql 5242880 5月 9 05:57 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 5月 9 05:25 ib_logfile1
drwx------ 2 mysql mysql 4096 4月 19 07:53 mysql
srwxrwxrwx 1 mysql mysql 0 4月 20 06:26 mysql.sock.bak
drwx------ 2 mysql mysql 4096 4月 19 07:53 test
drwx------ 2 mysql mysql 4096 4月 19 09:32 zabbix
[root@test-121 mysql]#
[root@test-121 mysql]#
[root@test-121 mysql]# service mysqld stop
停止 mysqld: [确定]
[root@test-121 mysql]# service mysqld start
正在启动 mysqld: [确定]
[root@test-121 mysql]#
MySQL故障处理一例_Another MySQL daemon 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. 删除如下文件即可解决 /var/lib/mysql ...
- 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 ...
- 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.
场景:vmvare虚拟机.centos7.mysql5.7 解决: mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak 参考: htt ...
- 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 ...
随机推荐
- poj 3233 Matrix Power Series 矩阵求和
http://poj.org/problem?id=3233 题解 矩阵快速幂+二分等比数列求和 AC代码 #include <stdio.h> #include <math.h&g ...
- MongoDB小结27 - 聚合管道【$project】
我们有这样的数据 { "_id" : 1, title: "abcdef", isbn: "6969696969", author: { l ...
- Angular CLI: 1.6.7 入门
当你使用npm或者yarn也安装不了angular-cli时,请使用淘宝镜像. Step1 npm i -g cnpm --registry=https://registry.npm.taobao.o ...
- linux驱动之中断方式获取键值
linux驱动之中断方式获取键值 ----------------------------------------------------------------------------------- ...
- 自己动手写Android数据库框架
前言 相信不少开发人员跟我一样,每次都非常烦恼自己写数据库,并且那些数据库语句也经常记不住.当然网上也有非常多非常好的数据库框架,你能够直接拿来用,可是 非常多时候我们的项目.特别是一个小型的Andr ...
- C#高级编程五十二天----有序列表
有序列表 假设须要基于对全部集合排序,就能够使用SortedList<TKey,TValue>类.这个类依照键给元素排序.这个集合中的值和键都能够使用随意类型. 以下的样例创建了一个有序列 ...
- js美化压缩工具Mark一下
jscompress https://www.jscompress.cn/
- HDU 1269 迷宫城堡 最大强连通图题解
寻找一个迷宫是否是仅仅有一个最大强连通图. 使用Tarjan算法去求解,经典算法.必需要学习好,要自己创造出来是十分困难的了. 參考资料:https://www.byvoid.com/blog/scc ...
- poj 3263 Tallest Cow(线段树)
Language: Default Tallest Cow Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 1964 Ac ...
- python 【目录】
python[目录] python[第一篇]初识python python[第二篇]python基本数据类型 python[第三篇]python函数基础