www.cnblogs.com/ruiyqinrui

开源、架构、Linux C/C++/python AI BI 运维开发自动化运维。 春风桃李花 秋雨梧桐叶。“力尽不知热 但惜夏日长”。夏不惜,秋不获。@ruiY--秦瑞

python爬虫,C编程,嵌入式开发.hadoop大数据,桉树,onenebula云计算架构.linux运维及驱动开发.

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

在国外网站发现的解决方法。

原因多个Mysql进程使用了同一个socket。

两个方法解决:

第一个是立即关机 使用命令 shutdown -h now 关机,关机后在启动,进程就停止了。

第二个直接把mysql.sock文件改名即可。也可以删除,推荐改名。

然后就可以启动mysql了。

 

下面是国外原文

 

To prevent the problem from occurring, you must perform a graceful shutdown of the server from the command line rather than powering off the server.

# shutdown -h now


This will stop the running services before powering down the machine.

Based on Centos, an additional method for getting it back up again when you run into this problem is to move mysql.sock:

# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

# service mysqld start
Restarting the service creates a new entry called mqsql.sock

posted on 2014-02-24 21:02  秦瑞It行程实录  阅读(269)  评论(0编辑  收藏  举报
www.cnblogs.com/ruiyqinrui