Failed to start LSB: start and stop MariaDB

Failed to start LSB: start and stop MariaDB

Table of Contents

1 总结

Failed to start LSB: start and stop MariaDB 这个错误常见的原因就是相关路径不存在。比如log-error相关路径没有创建。检查参数文件是否配置,如果有配置,配置路径是否都存在。

2 错误信息

Jun 22 21:40:11 test1 systemd[1]: Starting LSB: start and stop MariaDB...
Jun 22 21:40:11 test1 mysqld[29013]: Starting MariaDB.190622 21:40:11 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Jun 22 21:40:11 test1 mysqld[29013]: 190622 21:40:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jun 22 21:40:12 test1 mysqld[29013]: /etc/rc.d/init.d/mysqld: line 264: kill: (29029) - No such process
Jun 22 21:40:12 test1 mysqld[29013]: ERROR!
Jun 22 21:40:12 test1 systemd[1]: mysqld.service: control process exited, code=exited status=1
Jun 22 21:40:12 test1 systemd[1]: Failed to start LSB: start and stop MariaDB.
Jun 22 21:40:12 test1 systemd[1]: Unit mysqld.service entered failed state.
Jun 22 21:40:12 test1 systemd[1]: mysqld.service failed.

从错误信息上来看,什么有用的信息都没有。

好吧,靠猜。

报错退出之前mysql 要做的操作是" Logging to '/var/log/mariadb/mariadb.log". 有没有可能是因为这一步操作失败 导致mariadb无法启动呢?

3 解决

  • 查看相关参数

    [root@test1 mysql]# grep log-err /etc/my.cnf
    log-error=/var/log/mariadb/mariadb.log
    [root@test1 mysql]# ls /var/log|grep mariadb
    [root@test1 mysql]# 
    

    通过以上两步操作,确认,相关路径确实是不存在的。

    创建相关路径:

    mkdir -p /var/log/mariadb
    
  • 启动数据库

    systemctl start mysqld
    

就这样成功了。

Author: halberd.lee

Created: 2019-06-22 Sat 22:03

Validate

猜你喜欢

转载自www.cnblogs.com/halberd-lee/p/11070582.html
今日推荐