-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. T-SQL like charindex patindex 性能比较

    事实上在网上可以找到很多这方面的资料,在这边就不多说了~主要观点在性能方面还是比较倾向于charindex,下面就测试下: 测试环境:共50批次,每批次50000数据,测试总共250万数据. 一.li ...

  2. 胖子哥的大数据之路(11)-我看Intel&&Cloudera的合作

    一.引言 5月8日,作为受邀嘉宾,参加了Intel与Cloudera在北京中国大饭店新闻发布会,两家公司宣布战略合作,该消息成为继Intel宣布放弃大数据平台之后的另外一个热点新闻.对于Intel的放 ...

  3. LeetCode——2. Add Two Numbers

    一.题目链接:https://leetcode.com/problems/add-two-numbers 二.题目大意: 给定两个链表,每个链表表示一个非负数,不过数字的顺序是反过来存储的,要求给出这 ...

  4. [C#]App.Config

    <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm. ...

  5. jquery load()函数和window.onload事件

    我想用jquery load()一个饼状图页面, 但是load不出来 代码如下: 后来百度了一下,解决办法如下: window.onload事件只有在文档载入的时候才会执行的,你载入子页面不会触发这个 ...

  6. Socket传输简单的信息以及粘包问题的解决

    一.简单的socket程序——传输简短文字: # -*- coding: utf-8 -*- # -*- Author: WangHW -*- import socket whw_client = s ...

  7. [UE4]子弹碰撞

    在子弹actor蓝图“BP_LauncherBullet”中添加一个球体碰撞组件“Sphere Collision”,并设置为actor的根组件(直接拖放到默认根组件上面就会覆盖) 子弹碰撞预设 “B ...

  8. CountDownLatch与join的区别和联系

    首先,我们来看一个应用场景1: 假设一条流水线上有三个工作者:worker0,worker1,worker2.有一个任务的完成需要他们三者协作完成,worker2可以开始这个任务的前提是worker0 ...

  9. WebSocket 跨域

    http://www.cnblogs.com/joeymary/p/5259464.html

  10. 不曾忘记的Vue.js

    马上2017年就结束了,虽然我因为目前的项目用不上你vue,但是我不曾忘记你,在时间缝隙的某一刹那,我再次将你拾起. vue.js全家桶:vue+ vuex+axios+vue-router+webp ...