MySQL服务启动异常:Failed to start MySQL Server. mysqld.service holdoff time over, scheduling restart.

docker服务启动报错docker.service holdoff time over, scheduling restart. 阅读详情

MySQL服务启动异常

在这里插入图片描述

systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since 二 2023-07-18 20:15:00 CST; 2min 19s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 4357 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
  Process: 4085 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

7月 18 20:14:59 localhost.localdomain systemd[1]: Failed to start MySQL Server.
7月 18 20:14:59 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
7月 18 20:14:59 localhost.localdomain systemd[1]: mysqld.service failed.
7月 18 20:15:00 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart.
7月 18 20:15:00 localhost.localdomain systemd[1]: Stopped MySQL Server.
7月 18 20:15:00 localhost.localdomain systemd[1]: start request repeated too quickly for mysqld.service
7月 18 20:15:00 localhost.localdomain systemd[1]: Failed to start MySQL Server.
7月 18 20:15:00 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
7月 18 20:15:00 localhost.localdomain systemd[1]: mysqld.service failed.
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.

chown

chown是一个常用的Linux/Unix命令,用于改变文件或目录的所有者(owner)。它的主要作用是将文件或目录的所有权转移给指定的用户或用户组。

chown命令的语法如下:

chown [选项] 用户名:用户组 文件/目录
其中,常用的选项包括:

-R:递归地改变指定目录及其子目录下的文件和目录的所有权。
-c:只在执行改变所有权操作时显示提示信息。
-v:显示详细的操作信息。
使用chown命令,可以实现以下功能:

转移文件/目录的所有权:可以将文件/目录的所有者更改为其他用户。
chown 用户名 文件/目录
转移用户组所有权:可以将文件/目录的用户组更改为其他用户组。
chown :用户组 文件/目录
同时转移所有者和用户组所有权:可以将文件/目录的所有者和用户组同时更改为其他用户和用户组。
chown 用户名:用户组 文件/目录
递归改变文件/目录的所有权:通过添加 -R 选项,可以递归地改变指定目录及其子目录下的所有文件和目录的所有权。
chown -R 用户名:用户组 目录
chown命令常用于系统管理员或文件的所有者进行文件/目录的权限管理。它可以帮助确保合适的用户或用户组拥有适当的访问权限,并提高系统的安全性和可管理性。
使用chown授予目录里权限

chown mysql:mysql -R /var/lib/mysql
chown mysql -R /var/lib/mysql
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.
[root@localhost ~]# journalctl -xe
Then execute:
restorecon -v ‘/cdh/logs/mysqld.log’

                                                    Plugin catchall (17.1 confidence) suggests   
                                                  
                                                  If you believe that mysqld should be allowed append access on the mysqld.log file by default.
                                                  Then you should report this as a bug.
                                                  You can generate a local policy module to allow this access.
                                                  Do
                                                  allow this access for now by executing:
                                                  # ausearch -c 'mysqld' --raw | audit2allow -M my-mysqld
                                                  # semodule -i my-mysqld.pp

7月 18 20:24:15 localhost.localdomain setroubleshoot[11170]: failed to retrieve rpm info for /cdh/logs/mysqld.log
7月 18 20:24:15 localhost.localdomain setroubleshoot[11170]: SELinux is preventing /usr/sbin/mysqld from append access on the file /cdh/logs/mysqld.log. For complete SELinux messages run: sealert -l 4f2a
7月 18 20:24:15 localhost.localdomain python[11170]: SELinux is preventing /usr/sbin/mysqld from append access on the file /cdh/logs/mysqld.log.

                                                  *****  Plugin catchall_labels (83.8 confidence) suggests   *******************
                                                  
                                                  If you want to allow mysqld to have append access on the mysqld.log file
                                                  Then you need to change the label on /cdh/logs/mysqld.log
                                                  Do
                                                  # semanage fcontext -a -t FILE_TYPE '/cdh/logs/mysqld.log'
                                                  where FILE_TYPE is one of the following: NetworkManager_log_t, NetworkManager_tmp_t, abrt_tmp_t, abrt_upload_watch_tmp_t, abrt_var_cache_t, abrt_var_
                                                  Then execute:
                                                  restorecon -v '/cdh/logs/mysqld.log'

​
​ ***** Plugin catchall (17.1 confidence) suggests **************************
​

                                                  If you believe that mysqld should be allowed append access on the mysqld.log file by default.
                                                  Then you should report this as a bug.
                                                  You can generate a local policy module to allow this access.
                                                  Do
                                                  allow this access for now by executing:
                                                  # ausearch -c 'mysqld' --raw | audit2allow -M my-mysqld
                                                  # semodule -i my-mysqld.pp

lines 2190-2228/2228 (END)
Then execute:
restorecon -v ‘/cdh/logs/mysqld.log’

                                                  *****  Plugin catchall (17.1 confidence) suggests   **************************
                                                  
                                                  If you believe that mysqld should be allowed append access on the mysqld.log file by default.
                                                  Then you should report this as a bug.
                                                  You can generate a local policy module to allow this access.
                                                  Do
                                                  allow this access for now by executing:
                                                  # ausearch -c 'mysqld' --raw | audit2allow -M my-mysqld
                                                  # semodule -i my-mysqld.pp

7月 18 20:24:15 localhost.localdomain setroubleshoot[11170]: failed to retrieve rpm info for /cdh/logs/mysqld.log
7月 18 20:24:15 localhost.localdomain setroubleshoot[11170]: SELinux is preventing /usr/sbin/mysqld from append access on the file /cdh/logs/mysqld.log. For complete SELinux messages run: sealert -l 4f2a4ed9-4
7月 18 20:24:15 localhost.localdomain python[11170]: SELinux is preventing /usr/sbin/mysqld from append access on the file /cdh/logs/mysqld.log.

                                                  *****  Plugin catchall_labels (83.8 confidence) suggests   *******************
                                                  
                                                  If you want to allow mysqld to have append access on the mysqld.log file
                                                  Then you need to change the label on /cdh/logs/mysqld.log
                                                  Do
                                                  # semanage fcontext -a -t FILE_TYPE '/cdh/logs/mysqld.log'
                                                  where FILE_TYPE is one of the following: NetworkManager_log_t, NetworkManager_tmp_t, abrt_tmp_t, abrt_upload_watch_tmp_t, abrt_var_cache_t, abrt_var_log_t,
                                                  Then execute:
                                                  restorecon -v '/cdh/logs/mysqld.log'

​
​ ***** Plugin catchall (17.1 confidence) suggests **************************
​

                                                  If you believe that mysqld should be allowed append access on the mysqld.log file by default.
                                                  Then you should report this as a bug.
                                                  You can generate a local policy module to allow this access.
                                                  Do
                                                  allow this access for now by executing:
                                                  # ausearch -c 'mysqld' --raw | audit2allow -M my-mysqld
                                                  # semodule -i my-mysqld.pp

~
~
~
lines 2190-2228/2228 (END)
Then execute:
restorecon -v ‘/cdh/logs/mysqld.log’

                                                  *****  Plugin catchall (17.1 confidence) suggests   **************************
                                                  
                                                  If you believe that mysqld should be allowed append access on the mysqld.log file by default.
                                                  Then you should report this as a bug.
                                                  You can generate a local policy module to allow this access.
                                                  Do
                                                  allow this access for now by executing:
                                                  # ausearch -c 'mysqld' --raw | audit2allow -M my-mysqld
                                                  # semodule -i my-mysqld.pp

7月 18 20:24:15 localhost.localdomain setroubleshoot[11170]: failed to retrieve rpm info for /cdh/logs/mysqld.log
7月 18 20:24:15 localhost.localdomain setroubleshoot[11170]: SELinux is preventing /usr/sbin/mysqld from append access on the file /cdh/logs/mysqld.log. For complete SELinux messages run: sealert -l 4f2a
7月 18 20:24:15 localhost.localdomain python[11170]: SELinux is preventing /usr/sbin/mysqld from append access on the file /cdh/logs/mysqld.log.

                                                  *****  Plugin catchall_labels (83.8 confidence) suggests   *******************
                                                  
                                                  If you want to allow mysqld to have append access on the mysqld.log file
                                                  Then you need to change the label on /cdh/logs/mysqld.log
                                                  Do
                                                  # semanage fcontext -a -t FILE_TYPE '/cdh/logs/mysqld.log'
                                                  where FILE_TYPE is one of the following: NetworkManager_log_t, NetworkManager_tmp_t, abrt_tmp_t, abrt_upload_watch_tmp_t, abrt_var_cache_t, abrt_var_
                                                  Then execute:
                                                  restorecon -v '/cdh/logs/mysqld.log'

​
​ ***** Plugin catchall (17.1 confidence) suggests **************************
​

                                                  If you believe that mysqld should be allowed append access on the mysqld.log file by default.
                                                  Then you should report this as a bug.
                                                  You can generate a local policy module to allow this access.
                                                  Do
                                                  allow this access for now by executing:
                                                  # ausearch -c 'mysqld' --raw | audit2allow -M my-mysqld
                                                  # semodule -i my-mysqld.pp

重点错误信息:

7月 18 20:24:15 localhost.localdomain setroubleshoot[11170]: SELinux is preventing /usr/sbin/mysqld from append access on the file /cdh/logs/mysqld.log. For complete SELinux messages run: sealert -l 4f2a

SELinux(Security-Enhanced Linux)是一个安全增强的Linux安全模块,它提供了Linux系统级别的强制访问控制(MAC)机制。它的目标是通过附加强制访问控制机制,限制进程的权限,并提供更细粒度的访问控制来增强系统的安全性。

相对于传统的Linux访问控制方式(基于用户和权限的访问控制),SELinux引入了基于角色的访问控制和类型强制访问控制。它通过在内核中实施安全策略和访问规则来限制进程对资源的访问,并控制进程间的相互作用。

getenforce是一个用于查看SELinux当前状态的命令。它通常用于检查SELinux的执行模式,以确定SELinux是启用还是禁用,并获取其当前的执行级别。

getenforce

Enforcing

[root@localhost ~]# setenforce 0
[root@localhost ~]# sed -i 's/^SELINUX=.*/SELINUX=disabled/'  /etc/selinux/config
[root@localhost ~]# getenforce

Permissive

[root@localhost ~]# systemctl start mysqld
[root@localhost ~]# systemctl status mysqld

● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since 二 2023-07-18 20:26:07 CST; 5s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 13063 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 13036 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 13066 (mysqld)
Tasks: 30
CGroup: /system.slice/mysqld.service
└─13066 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

7月 18 20:26:06 localhost.localdomain systemd[1]: Starting MySQL Server…
7月 18 20:26:07 localhost.localdomain systemd[1]: Started MySQL Server.

基于GIS的生态安全网络格局构建(附练习数据下载) 阅读详情

相关推荐

IAR许可证Generation 18代际不匹配问题解析与解决

IAR Embedded Workbench 的许可证机制采用‘代际(Generation)’模型,而非简单版本号匹配——这是一种基于数字签名算法、加密协议和硬件绑定策略演进的授权安全体系。Generation 18 是 v9.30 及以上版本强制要求的许可代际标准,对应 ECDSA 签名与增强型硬件指纹校验,旨在提升防破解能力与平台适配性。当旧版许可证(如 Generation 16/17)被用于新 IDE 时,启动器会在本地完成代际校验并直接拦截,导致‘The generation feature is

weixin_34203832的博客 337

[mysql]错误解决之"Failed to start MySQL Server"

注意!注意!注意!下面的操作,请您看完再自行决定要不要采纳这个建议!否则造成的后果,与我无关~ 好了,接下来正文开始

自由而不独立,仍是奴隶。 5万+

VINS-Fusion实战:从零搭建无人机视觉SLAM系统(附ROS配置全流程)

本文详细介绍了如何从零开始为无人机搭建基于VINS-Fusion的视觉SLAM系统。内容涵盖硬件选型(重点推荐双目相机与IMU搭配)、ROS环境配置、传感器标定、核心参数调优以及实际飞行测试与问题排解全流程,旨在帮助开发者实现稳定、精确的无人机自主定位与导航。

wasm7browser的博客 213

Mysql启动过程错误解决方案

1、下载 mysql5.7 的rpm包 wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm 2.安装rpm包 rpm -ivh mysql57-community-release-el7-9.noarch.rpm 执行完成后会在/etc/yum.repos.d/目录下生成两个repo文件:mysql-community.repo、mysql-community-source.repo ls /etc/yum

gaojingsong的专栏 6228

基于继电器与三极管的自动水泵控制器DIY:从电路原理到PCB制作实战

继电器作为一种利用电磁原理实现电路通断控制的电气开关,其核心价值在于通过小电流信号控制大电流负载,实现强弱电之间的安全隔离。在自动化控制领域,继电器常与三极管等半导体器件配合,构成驱动电路,将微弱的传感器信号放大,从而可靠地控制电机、水泵等执行机构。这种组合技术广泛应用于工业控制、智能家居及各类电子DIY项目中,例如实现水箱水位的自动检测与控制。本文将以一个典型的自动水泵控制器项目为例,深入剖析如何利用继电器与三极管搭建水位检测与驱动电路,并详细讲解从电路设计、PCB自制(热转印法)到系统调试的完整工程实践

weixin_31774841的博客 346

运维面试常见问题

对数据库表中一列或多列的值进行排序的一种结构,使用索引可快速访问数据库表中的特定信息。优缺点:优点:利用索引可以加速对数据的检索,索引是可以唯一的,创建索引允许指定单个列或者多个列缺点:减慢了数据录入速度,同时也增加了数据库的尺寸大小。

asdmjy123的博客 1365

Mysql学习

1. CentOS 下启动、关闭、重启、查看MySQL服务 1. 启动服务 [root@localhost ~]# service mysqld start Redirecting to /bin/systemctl start mysqld.service 2. 查看服务 [root@localhost ~]# service mysqld status Redirecting to /bin/systemctl status mysqld.service ● mysqld.service -

half_cup的博客 821

华为交换机实战:如何用ACL+流分类精准限制特定IP的网速(附完整命令)

本文详细介绍了华为交换机如何通过ACL+流分类技术实现精准IP限速,包括ACL规则配置、流分类关联、流行为定义及流策略应用等完整步骤。文章提供了实战命令和配置验证方法,帮助网络管理员有效管理带宽资源,解决特定IP占用过多带宽的问题。

weixin_29229055的博客 100

mysqld.service holdoff time over, scheduling restart.

环境: centos7.4 + mysql5.7.31 启动mysql报错: mysqld.service holdoff time over, scheduling restart. 报错原因: MySQL的配置文件里变更了数据存储路径,将/var/lib/mysql的整个目录mv到/opt/lib/下,但是配置文件里的sock文件的路径和pid文件的路径没有改动,仍然是/var/lib/mysql,但是此时/var/lib/下已经没有mysql目录了,所以启动报错 解决: 方案一:将配置文件/et

Echo_Blingbling的博客 1万+

SAP MM ME21N保存前检查增强

想在ME21N保存前做一些数据检查, 可以做一个增强功能,  运行 CMOD 新增,   增强接口 输入 MM06E005  (  EXIT_SAPMM06E_012 ) ,在 NCLUDE ZXM06U43 .  里写代码功能。  例子如下: *&---------------------------------------------------------------------*

heng0757的专栏 1万+

【100%通过率】华为od 机试真题 C语言 实现【补种未成活胡杨】

近些年来,我国防沙治沙取得显著成果。某沙漠新种植N棵胡杨(编号1-N),排成一排。一个月后,有M棵胡杨未能成活。现可补种胡杨K棵,请问如何补种(只能补种,不能新种),可以得到最多的连续胡杨树?

MISAYAONE的博客 1653

mysql启动失败错误mysqld.service holdoff time over, scheduling restart.

由于搭建主从分布式mysql环境,在搭建前,对之前的mysql残留环境彻底清除。清除命令如下: #yum remove mysql* mariadb* -y            #rm /etc/my.cnf                           #rm -rf /var/lib/mysql                    #rm -rf /usr/share/mys...

心向,往之 3万+

量化交易:如何在QMT中运行Python策略并在VSCode中高效调试?

哈喽,大家好,我是木头左!

木头大左的博客 3757

mysql time over_mysql启动失败错误mysqld.service holdoff time over, scheduling restart.

由于搭建主从分布式mysql环境,在搭建前,对之前的mysql残留环境彻底清除。清除命令如下:#yum remove mysql* mariadb* -y#rm /etc/my.cnf#rm -rf /var/lib/mysql#rm -rf /usr/share/mysql#rm -rf /usr/lib/mysql查询mysql服务#systemctl list-unit-files | gr...

weixin_32787485的博客 3053

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

Linux虚拟机无法自动启动MySQL服务,报错:Failed to start MySQL Server.

Linux虚拟机无法自动启动MySQL服务,报错:Failed to start MySQL Server.source /etc/profile只在运行终端生效,新开启的终端无效的问题。

weixin_56114243的博客 3379

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

mysql server failed to start_[mysql]错误解决之\"Failed to start MySQL Server\"

无论你安装过多少次mysql,仍然会出现各种各样的错误,既然出现了,就想办法解决它:OK!接下来教大家怎样查看错误日志,去解决懵逼的代码错误。错误:经过一些列的 重启操作、查看错误详情,并不能精准找到错误原因,经过一番百度,发现有说磁盘空间不足的、有说需要删除var/lib/mysql的无论哪种说法,都要找到一种切实符合自身问题的解决办法。我是的磁盘空间是非常充足的,所以我尝试了删除var/lib...

weixin_33293858的博客 1308

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

【MySQL】service mysql start时出现Failed to start mysql.service: Unit not found

本文无需安装mariadb!!! 本文无需安装mariadb!!! 本文无需安装mariadb!!! 本文无需安装mariadb!!! 正文: 1-前提条件:mysql已安装好 2-原因:/etc/init.d中没有mysql启动项 3-解决方法: a.查找mysql.server所在的位置: [root@localhost ~]# find / -name mysql.server b.把mysql.server复制到/etc/init.d中: cp /ruanjian/mysql/support-fi

shenhaiyushitiaoyu的博客 2万+

Failed to start mysql.service:Unit mysql.service not found(100%成功解决问题)

在ubuntu中安装mysql后,启动mysql报错,这篇文章提供最根本的解决方法

m0_73744583的博客 1万+

linux启动mysql报错 Failed to start MySQL Server

昨天,测试环境的mysql突然挂了,咱也不知道什么时候挂的,那既然挂了,就重启下,但是起不来了。。报Failed to start MySQL Server 现象 分析和解决 查my.cnf的配置 [root@test199 ~]# vi /etc/my.cnf datadir=/data/mysql #数据存储 socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted

北巷东东的专栏 1万+

mysql 安装 failed to start_[mysql]错误解决之"Failed to start MySQL Server"

无论你安装过多少次mysql,仍然会出现各种各样的错误,既然出现了,就想办法解决它:OK!接下来教大家怎样查看错误日志,去解决懵逼的代码错误。错误: 经过一些列的 重启操作、查看错误详情,并不能精准找到错误原因,经过一番百度,发现有说磁盘空间不足的、有说需要删除var/lib/mysql的无论哪种说法,都要找到一种切实符合自身问题的解决办法。我是的磁盘空间是非常充足的,所以我尝试了删除var/li...

weixin_30431923的博客 4483

Linux下MySQL出现“Failed to start MySQL Server.“

问题描述:云服务器(Linux系统)上的数据库突然崩了…我也不知道为什么…错误描述如下图所示: 解决方法 ① 初始化数据库 [root@izbp143hp2ts232tf83uuwz /]# mysqld --initialize ② 重启数据库 [root@izbp143hp2ts232tf83uuwz mysql]# service mysqld restart ③ 查看数据库服务,启动错误消失魔法消除错误 [root@izbp143hp2ts232tf83uuwz local]# ser.

weixin_43574277的博客 3142

Failed to start mysql.service: Unit not found

mariadb安装与使用

NLP与推荐算法 8180

启动mysql报错:mysql.service: Service hold-off time over, scheduling restart

启动mysql时报错 root@iZ2ze58mrrj1x9veg257uvZ conf.d]# systemctl status mysqld.service ● mysqld.service - MySQL Community Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor ...

天涯的浪子 4986

启动mysql报错:mysql.service: Service hold-off time over, scheduling restart.

启动mysql时报错root@iZ2ze58mrrj1x9veg257uvZ conf.d]# systemctl status mysqld.service ● mysqld.service - MySQL Community Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor pre...

乔永刚的博客 1万+

mysql 8.0 Failed to start MySQL Server.

原因:文件夹无写入权限。 查看日志报错 cat /var/log/mysqld.log 查找文件路径 find / -name ibdata1 授予文件夹权限 chmod -R 777 /var/lib/mysql chown mysql:mysql -R /var/lib/mysql 启动MySQL systemctl start mysqld.service 查看MySQL状态 systemctl status mysqld.service ...

weixin_44359392的博客 2550
上一篇: Kafka消息监控管理工具Offset Explorer的使用教程
下一篇: 安装 CDH执行scm_prepare_database.sh报错,java.sql.SQLException: Access denied for user ‘scm‘@‘localhost‘
数智客栈
博客等级 码龄17年 5699粉丝 89原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值