打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Unit mysqld.service could not be found.
表白:黑白圣堂血天使,天剑鬼刀阿修罗。 
讲解对象:
/Unit mysqld.service could not be found.
作者:融水公子 rsgz
===

Unit mysqld.service could not be found.

centos7里面执行

systemctl status mysqld.service
然后就出现了Unit mysqld.service could not be found.报错!

这是主流的处理方法:
1 这个命令本质调用的是:/bin/systemctl status mysqld.service  但是依旧找不到mysqld.service
[root@rsgz ~]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
Unit mysqld.service could not be found

2 查询/etc/init.d/下是否存在mysql
ll /etc/init.d/ | grep mysql

3 查询mysql.server
find / -name mysql.server

4 把mysql.server复制到/etc/init.d/mysql中,假如你的安装在/usr/local/mysql/
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql

当然我碰到另一种情况。

查看一下进程,有数字就有进程:

[root@rsgz ~]# pidof mysqld
1278
[root@rsgz ~]# ps aux | grep mysqld

安装了mysql很久了,我忘了我当时安装的是MariaDB数据库(这个和mysql一模一样,就是名字不同),所以查看数据库状态的命令要改成这样:
启动:systemctl start mariadb.service
停止:systemctl stop mariadb.service
状态:systemctl status mariadb.service

接下来使用这个命令就能查看到状态了


===
 
公众号:不浪仙人
谢谢大家的支持!可以点击我的头像,进入我的空间浏览更多文章呢。建议大家360doc[www.360doc.com]注册一个账号登录,里面真的有很多优秀的文章,欢迎大家的到来。
---
';
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Centos7 安装配置Mysql
Linux Systemd 详细介绍: Unit、Unit File、Systemctl、Target
Linux 安装 MySQL 详细教程
【Linux】centos7上彻底删除并安装mysql8.0、mysql5.7 rpm方式安装(亲测)
centos7用yum搭建LAMP环境
Centos7中MySQL8.0安装过程及遇到的问题记录
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服