systemd[1]: mariadb.service: Can't open PID file /data/mariadb/mysql/30-mariadb-1.pid (yet?) after start: No such file or directory

   环境:Centos8
   编译安装Mariadb-10.4.11,安装到make install都没有问题,添加服务启动脚本到/lib/systemd/system/,服务启动脚本名为mariadb.service,下面是自己添加的Mariadb服务启动脚本

 1 [Unit]
 2 Description=Mariadb Community Server
 3 After=network.target
 4
 5 [Service]
 6 User=mariadb
 7 Group=mariadb
 8 Type=forking
 9 PermissionsStartOnly=true
10 PIDFile=/data/mariadb/30-mariadb-1.pid
11 ExecStart=/usr/local/mariadb/support-files/mysql.server start
12 ExecReload=/usr/local/mariadb/support-files/mysql.server restart
13 ExecStop=/usr/local/mariadb/support-files/mysql.server stop
14 PrivateTmp=false
15
16 [Install]
17 WantedBy=multi-user.target

   使用systemctl start mariadb尝试启动Mariadb,结果出错

   查看Mariadb错误日志并没有找到有用的信息


   查看mariadb状态出现下面内容

   “systemd[1]: mariadb.service: Can‘t open PID file /data/mariadb/mysql/30-mariadb-1.pid (yet?) after start: No such file or directory”根据这行内容,留意了一下该pid文件,发现在启动mariadb时会出现,启动出错后消失,该/data/maridb目录本身所属主与所属组都是mariadb并且权限是777,按理来说不可能是因为权限不足的原因造成的

   通过百度到的这篇问答https://askubuntu.com/questions/1117330/opendkim-wont-start-cant-open-pid-file,虽然并不是围绕Mariadb的问题,但一样显示Can‘t open PID file问题,下面回复的解决方法是注释或删除掉在启动脚本中PIDFile行,试了一下,问题解决mariadb成功启动

   

    

systemd[1]: mariadb.service: Can't open PID file /data/mariadb/mysql/30-mariadb-1.pid (yet?) after start: No such file or directory

原文地址:https://www.cnblogs.com/capmew/p/12048965.html

时间: 2024-07-29 23:31:16

systemd[1]: mariadb.service: Can't open PID file /data/mariadb/mysql/30-mariadb-1.pid (yet?) after start: No such file or directory的相关文章

(/var/lib/mysql/NeoKylin-CNVL.cs1cloud.internal.pid).   [失败]

启动mysql数据库失败 [[email protected] opt]# service mysql start Starting MySQL.....The server quit withoutupdating PID file (/var/lib/mysql/NeoKylin-CNVL.cs1cloud.internal.pid).                         [失败] 解决方法: 将ervice mysql start启动方式改为/etc/init.d/mysqls

关于运行mysql_install_db命令导致sudo systemctl start /restart mariadb.service启动失败问题

运行环境:centos 7 数据库:mariadb 问题描述:在yum安装mariadb数据库运行后运行了/var/lib/mysql_install_db命令,从而导致mariadb数据库启动或重启都失败. 故障解决: [[email protected] mysql]$ sudo systemctl start mariadb.service  Job for mariadb.service failed because the control process exited with err

centos7 systemd加入mysqld.service

说明: 前面的数据库文章中提到数据库初始化主主所以这里就直接接着上文写了 写一个mysql.service vim mysql.service [Unit] Description=MySQL Server Documentation=man:mysqld(5.7) After=network.target After=syslog.target Before=shutdown.target # 关机前操作 [Install] WantedBy=multi-user.target Alias=m

Loaded:loaded(/usr/lib/systemd/system/iptables.service;enabled)Active: inactive

[[email protected] ~]# service iptables start Redirecting to /bin/systemctl start  iptables.service [[email protected] ~]# /bin/systemctl start  iptables.service [[email protected] ~]# service iptables status Redirecting to /bin/systemctl status  ipt

Ubutntu安装docker启动报Removed /etc/systemd/system/docker.service.

Ubutntu安装docker启动报Removed /etc/systemd/system/docker.service.的错误,只需要执行以下三条命令. systemctl unmask docker.service systemctl unmask docker.socket systemctl start docker.service 原文地址:https://www.cnblogs.com/li-bing/p/9245783.html

systemd:在service文件中给Exec传入多个参数

原问题是这样的: 答案是这样的: 此外在使用prometheus监控mongodb时需要安装prometheus-mongodb-exporter,过程中也发现这种用法: 看看service单元文件是怎么写的: cat /lib/systemd/system/prometheus-mongodb-exporter.service 内容如下: [Unit] Description=Prometheus exporter for MongoDB Documentation=https://githu

11.1 LAMP架构介绍 11.2 MySQL、MariaDB介绍 11.3/11.4/11.5 MySQL安装

11.1 LAMP架构介绍 11.2 MySQL.MariaDB介绍 11.3/11.4/11.5 MySQL安装 扩展 mysql5.5源码编译安装 http://www.aminglinux.com/bbs/thread-1059-1-1.html mysql5.7二进制包安装(变化较大) http://www.apelearn.com/bbs/thread-10105-1-1.html 11.1 LAMP架构介绍 Linux + Apache(httpd)+ MySQL + PHP  PH

九周第四次课(2月26日) 11.1 LAMP架构介绍 11.2 MySQL、MariaDB介绍 11.3/11.4/11.5 MySQL安装 扩展 mysql5.5源码编译安装

11.1 LAMP架构介绍11.2 MySQL.MariaDB介绍11.3/11.4/11.5 MySQL安装扩展mysql5.5源码编译安装   http://www.aminglinux.com/bbs/thread-1059-1-1.html mysql5.7二进制包安装(变化较大)  http://www.apelearn.com/bbs/thread-10105-1-1.html =====================================================

mysql兼mariadb安装过程详解

mysql兼mariadb下载自己找自己对应的版本: https://dev.mysql.com/downloads/mysql/ 因为5.5以后都用cmake编译了,所以系统里没有的话,就下个源码的装一下,怎么测试系统里有没有装了,在命令行中输入#cma  在按Tab看有没有cmake  有的话系统就装过了,就不用在装了.没有话就去下个吧,下载地址:https://cmake.org/download/ 还要装boost才能装cmake,boost下载地址:https://sourceforg