• cdh的mysql无法启动问题


    [root@spark01 ~]# /etc/init.d/mysqld start
    Starting mysqld (via systemctl):  Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
                                                               [FAILED]

    创建/var/run/mysqld/目录,重启MySQL服务

    [root@spark01 ~]# mkdir -p /var/run/mysqld/

    [root@spark01 ~]# /etc/init.d/mysqld start

    Starting mysqld (via systemctl):  Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
                                                               [FAILED]

    依旧报错,重新查看告警日志,有以下输出

    2016-01-20T10:28:37.183387Z 0 [ERROR] /usr/sbin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 13 - Permission denied)
    2016-01-20T10:28:37.183431Z 0 [ERROR] Can't start server: can't create PID file: Permission denied
    160120 18:28:37 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
    160120 18:32:06 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

    原来,/var/run/mysqld/的属主和属组还是root,mysql并不能在其中创建文件,后修改该目录的属主和属组,启动OK。

    [root@spark01 ~]# ls -ld /var/run/mysqld/
    drwxr-xr-x 2 root root 40 Jan 20 18:28 /var/run/mysqld/
    [root@spark01 ~]# chown mysql.mysql /var/run/mysqld/
    [root@spark01 ~]# /etc/init.d/mysqld start
    Starting mysqld (via systemctl):                           [  OK  ]
  • 相关阅读:
    eNSP进行配置网络模拟网络联通
    Labview上使用mydaq采集数据
    Labview实现计算器
    matlab小记(四)
    matlab小记(三)
    matlab小记(二)
    matlab小记(一)
    Python中map和reduce
    Python 如何调用自定义函数
    《机电传动控制》第十一周作业(二)
  • 原文地址:https://www.cnblogs.com/tianqien0423/p/10943793.html
Copyright © 2020-2023  润新知