zoukankan      html  css  js  c++  java
  • 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.

    原因

    非正常的关闭/停止服务,导致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,你会发现相似例如以下日志:

    网上百度到该问题的解决的方法都是:

    笔者试了非常多此,发现还是启动不成功.细看log,文本末尾写着的不仅仅/var/lib/mysql/mysql.sock,还有/var/lib/mysql/mysql1.sock,/var/lib/mysql/mysql22.sock.而我的文件夹文件夹中也正好存在这些文件.于是猜想, mysql异常关闭之后,不单仅仅产生myql.sock,还有其它sock文件,我将这三个sock文件都重命名后,myql便正常启动了.

    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

    版权声明:本文博客原创文章。博客,未经同意,不得转载。

  • 相关阅读:
    javascript 实现页面跳转,禁止返回上一页【转】
    mysql 根据多个不同字段进行分组,并统计总数,求和
    阻止移动端浏览器点击图片浏览行为的几种方法【转】
    iframe子父窗口相互操作方法或元素
    jquery 之ajax,get,post异步请求简单代码模版
    select默认选择后台转过来的option选项
    Font Awesome 最简单应用例子
    清空select标签中option选项的3种不同方式
    js将字符串转换成json的三种方式
    Js获取当前日期时间
  • 原文地址:https://www.cnblogs.com/lcchuguo/p/4654424.html
Copyright © 2011-2022 走看看