V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
kmdd33
V2EX  ›  程序员

centos7 上 mysql 无法正常启动了

  •  
  •   kmdd33 · 2018-04-24 11:07:22 +08:00 · 2433 次点击
    这是一个创建于 2165 天前的主题,其中的信息可能已经有所发展或是发生改变。

    sudo systemctl start mysqld

    Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

    sudo systemctl status mysqld

    https://i.imgur.com/KtjreBu.png

    journalctl -xe

    https://i.imgur.com/ryid027.png

    mysqld.log 里面的日志显示: 180424 02:55:53 mysqld_safe A mysqld process already exists 180424 02:55:55 mysqld_safe Logging to '/var/log/mysqld.log'. 180424 02:55:55 mysqld_safe A mysqld process already exists 180424 02:55:57 mysqld_safe Logging to '/var/log/mysqld.log'. 180424 02:55:57 mysqld_safe A mysqld process already exists 180424 02:55:59 mysqld_safe Logging to '/var/log/mysqld.log'. 180424 02:55:59 mysqld_safe A mysqld process already exists

    怎么办?大佬们,在线等,谢谢。

    8 条回复    2018-04-24 12:02:11 +08:00
    letitbesqzr
        1
    letitbesqzr  
       2018-04-24 11:14:13 +08:00
    mysqld_safe A mysqld process already exists 180424


    写的不是很清楚..
    kmdd33
        2
    kmdd33  
    OP
       2018-04-24 11:35:51 +08:00
    @letitbesqzr 日志里面全部都是这种提示,你看看错误图片
    kmdd33
        3
    kmdd33  
    OP
       2018-04-24 11:41:25 +08:00
    # ps aux |grep mysqld
    wekw
        4
    wekw  
       2018-04-24 11:41:32 +08:00
    A mysqld process already exists

    我帮你人肉翻译:已经有一个 mysqld 进程正在运行
    kmdd33
        5
    kmdd33  
    OP
       2018-04-24 11:44:21 +08:00
    @wekw 但是重启是失败的,请问如何解决重启的问题呢?

    ob
        6
    ob  
       2018-04-24 11:50:18 +08:00 via Android
    先 kill 掉,检查下 my.cnf 配置。
    kmdd33
        7
    kmdd33  
    OP
       2018-04-24 11:59:17 +08:00
    ok 解决掉了:

    # ps -A | grep mysql
    8295 pts/4 00:00:00 mysql_secure_in
    11599 ? 00:00:00 mysqld_safe
    11737 ? 00:00:39 mysqld

    然后# kill -9 11599
    # kill -9 11737
    然后:sudo systemctl start mysqld

    谢谢各位
    YumeMichi
        8
    YumeMichi  
       2018-04-24 12:02:11 +08:00
    汗颜 你这是初中英语没过关吗 start 是启动不是重启 restart 才是重启
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3000 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 14:45 · PVG 22:45 · LAX 07:45 · JFK 10:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.