zoukankan      html  css  js  c++  java
  • Starting MySQL... ERROR! The server quit without updating PID file (/home/mysql-5.6.43/data/localhost.localdomain.pid).

    启动MySQL出现如下错误

    May 21 20:37:58 localhost mysqld: Starting MySQL... ERROR! The server quit without updating PID file (/home/mysql-5.6.43/data/localhost.localdomain.pid).
    May 21 20:37:58 localhost systemd: mysqld.service: control process exited, code=exited status=1
    May 21 20:37:58 localhost systemd: Failed to start LSB: start and stop MySQL.
    May 21 20:37:58 localhost systemd: Unit mysqld.service entered failed state.
    May 21 20:37:58 localhost systemd: mysqld.service failed.

    试了网上很多解决办法都不行

    MySQL版本:mysql-5.6.43

    切换到MySQL  data dir(MySQL的数据文件目录下)

    获取MySQL用户运行的MySQL进程的pid,然后导入到localhost.localdomain.pid文件里面

    # echo `ps aux | grep mysql | grep "user=mysql" | grep -v "grep" | awk '{print $2}'`>> redhat.pid

    # mv redhat.pid localhost.localdomain.pid

    # chown mysql:mysql localhost.localdomain.pid

    重启MySQL

    # systemctl restart mysqld

    问题已经解决,MySQL启动成功

    参考博客:

    MySQL下PID文件丢失的相关错误的解决方法

    http://www.imooc.com/article/265437

    MySQL配置文件my.cnf的理解

    https://www.cnblogs.com/langdashu/p/5889352.html

  • 相关阅读:
    IIS服务器应用程序不可用的解决办法
    C#几个经常犯错误汇总
    C1flexgrid格式化
    图片自动按比例缩小代码(防止页面被图片撑破)
    VSS2005的使用与配置过程
    ASP.NET通过IHttpModule实现伪静态
    五一游玩收藏
    plants
    几个JS的方法
    英式英语VS美式英语的差异
  • 原文地址:https://www.cnblogs.com/djlsunshine/p/10910308.html
Copyright © 2011-2022 走看看