-bash-4.2# service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
Failed to restart mysqld.service: Unit not found.

并不存在 mysqld 的服务,

-bash-4.2#
-bash-4.2# chkconfig -list
-list: unknown option
-bash-4.2# chkconfig --list Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration. If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'. aegis :off :off :on :on :on :on :off
agentwatch :off :off :on :on :on :on :off
iprdump :off :off :on :on :on :on :off
iprinit :off :off :on :on :on :on :off
iprupdate :off :off :on :on :on :on :off
jexec :off :on :on :on :on :on :off
mysql.server :off :off :on :on :on :on :off
netconsole :off :off :off :off :off :off :off
network :off :off :on :on :on :on :off

可见,服务名不是mysqld 而是 mysql.server

于是:

-bash-4.2# service mysql.server restart
Shutting down MySQL....[ OK ]
Starting MySQL.[ OK ]

mysqld服务启动失败, Failed to restart mysqld.service: Unit not found.的更多相关文章

  1. Failed to restart ssh.service: Unit not found.

    环境 操作系统:CentOS 7 问题 重启ssh服务,启动报错:Failed to restart ssh.service: Unit not found. 操作步骤 1. 编辑sshd_confi ...

  2. docker报错:Failed to restart docker.service: Unit not found.

    前言:我之前安装好docker了,但是关机重启后,发现docker就没了 报错:Failed to restart docker.service: Unit not found.   解决方法: 1. ...

  3. Redirecting to /bin/systemctl restart mysql. service Failed to restart mysql.service: Unit not found.

    使用如下命令操作mysql即可: systemctl restart mysqld.service systemctl start mysqld.service systemctl stop mysq ...

  4. 最新cenos执行service httpd restart 报错Failed to restart httpd.service: Unit not found.

    原来是需要将Apache注册到Linux服务里面啊!注册Apache到Linux服务在Linux下用源代码方式编译安装完Apache后,启动关闭Apache可以通过如下命令实现: /usr/local ...

  5. 【解决】Failed to restart network.service: Unit network.service not found.

    问题:使用systemctl restart network 或 service network restart 命令重启网卡失败. 分析:原因其实也很简单,命令用错了,造成了找不到相应的网卡服务. ...

  6. Failed to restart docker.service: Unit not found 镜像加速

    解决方案 以前的安装残留 重新安装 find / -name "docker*" centos8 添加软件源信息 yum-config-manager --add-repo htt ...

  7. CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load

    错误信息如下: [root]# service iptables start Redirecting to /bin/systemctl start iptables.service Failed t ...

  8. Linux_异常_03_Failed to restart iptables.service: Unit not found.

    启动防火墙时出现: Failed to restart iptables.service: Unit not found. 解决方案: 1.https://stackoverflow.com/ques ...

  9. CentOS 7下MySQL服务启动失败的解决思路

    今天,启动MySQL服务器失败,如下所示: [root@spark01 ~]# /etc/init.d/mysqld start Starting mysqld (via systemctl): Jo ...

随机推荐

  1. nginx-ngx_http_random_index_module

    模块简介:在收到以"/"为结尾的请求时,在对应的目录下随机选择一个文件作为index文件. 模块类型:常用标准http模块 使用实例: location /privacy_poli ...

  2. js跨域调用mvc ActionResult扩展

    背景 最近2个项目中都用到了js跨域访问的知识,2个项目都需要主站与各个分站之间进行数据交互.状态同步等相关操作.浏览器本身是不允许进行跨域访问,在MVC中我们可以扩展一个方法来实现这个功能.在此大家 ...

  3. DS树+图综合练习--构建邻接表

    题目描述 已知一有向图,构建该图对应的邻接表.邻接表包含数组和单链表两种数据结构,其中每个数组元素也是单链表的头结点,数组元素包含两个属性,属性一是顶点编号info,属性二是指针域next指向与它相连 ...

  4. (转载)关于java多线程web服务器 以及相关资料转载

    1.自己实现的简单的java多线程web服务器: https://blog.csdn.net/chongshangyunxiao321/article/details/51095149 自己实现一个简 ...

  5. 学习笔记之Python调试 - pdb

    python调试神器——pdb - 软谋python https://mp.weixin.qq.com/s/w3Xw8I_zh7MFq2dx5kdQXw 优秀开发者必备技能包:Python调试器 - ...

  6. shell命令输出

    在shell脚本中的打印输出通常会有echo和printf两种,前者会自动换行. 一.echo Shell 的 echo 指令与 PHP 的 echo 指令类似,都是用于字符串的输出.您可以使用ech ...

  7. Java里数组的三种初始化方式

    静态初始化 除了用new关键字来产生数组以外,还可以直接在定义数组的同时就为数组元素分配空间并赋值. // 静态初始化 int[] iStaticArr = { 5, 2, 0 }; LOLHero[ ...

  8. win10 php7.2 nginx 安装 imagick,适用于phpstudy

    imagick 拓展的下载地址 https://windows.php.net/downloads/pecl/releases/imagick/ 可惜的是这个地址最新版没有php7.2, 如果是7.1 ...

  9. ArcEngine 创建空间参考设置默认域

    ISpatialReferenceFactory3 spatialReferenceFactory = new SpatialReferenceEnvironmentClass(); outSR = ...

  10. RAC集群安装校验输出信息

    RAC集群安装校验输出信息 作者:Eric 微信:loveoracle11g [grid@rac-node1 grid]$ [grid@rac-node1 grid]$ ./runcluvfy.sh ...