1 环境:ubuntu
2 问题描述:
停止mysql服务,输入命令:
service mysqld stop
出现如下报错:
root@iZ2ze8qk0tdrzqj7sd1kZ:/usr/bin# service mysqld stop
Failed to stop mysqld.service: Unit mysqld.service not loaded.
3 解决:
输入命令:
systemctl enable mysql.service
执行结果:
root@iZ2ze8qk0tdrzqj7sd1kZ:~# systemctl enable mysql.service
Synchronizing state of mysql.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable mysql
insserv: can not symlink(../init.d/aegis, ../rc2.d/S02aegis): File exists
insserv: can not symlink(../init.d/aegis, ../rc3.d/S02aegis): File exists
insserv: can not symlink(../init.d/aegis, ../rc4.d/S02aegis): File exists
insserv: can not symlink(../init.d/aegis, ../rc5.d/S02aegis): File exists
停止mysql服务,再次输入命令:
systemctl stop mysql
4 验证:
查询mysql进程,输入命令:
ps -aux|grep mysql
执行结果:文章来源:https://www.toymoban.com/news/detail-575381.html
root@iZ2ze8qk0tdrzqj7sd1kZ:~# ps -aux|grep mysql
root 4765 0.0 0.0 14224 1088 pts/0 S+ 15:20 0:00 grep --color=auto mysql
没有mysql进程,说明mysql已经关闭。文章来源地址https://www.toymoban.com/news/detail-575381.html
到了这里,关于Mysql问题:Failed to stop mysqld.service: Unit mysqld.service not loaded的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!