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

  • 相关阅读:
    BOM
    CSS 定位与浮动
    轮播
    跨域
    Flex-弹性布局
    vue.js开发环境搭建以及创建一个vue实例
    js闭包
    git的一些基本命令
    不定宽块状元素居中方法
    git中常用命令小结
  • 原文地址:https://www.cnblogs.com/djlsunshine/p/10910308.html
Copyright © 2011-2022 走看看