解决Failed to issue method call: Unit mysql.service failed to load: No such file or directory

解决Failed to issue method call: Unit mysql.service failed to load: No such file or directory,第1张

概述解决Failed to issue method call: Unit mysql.service failed to load: No such file or directory 感兴趣的小伙伴,下面一起跟随内存溢出 jb51.cc的小编两巴掌来看看吧!

1、软件环境:

OpenSUSE 13.1 x64MysqL 5.6.20 x64

2、采用RPM包安装MysqL 5.6.20

# rpm -ivh MysqL-server-5.6.20-1.sles11.x86_64.rpm# rpm -ivh MysqL-clIEnt-5.6.20-1.sles11.x86_64.rpm# rpm -ivh MysqL-devel-5.6.20-1.sles11.x86_64.rpm# rpm -ivh MysqL-shared-5.6.20-1.sles11.x86_64.rpm

3、查看MysqL服务

# /etc/init.d/MysqL statusMysqL is not running                                                                                                    FailedMysqL.serviceLoaded: not-found (Reason: No such file or directory)Active: inactive (dead)Aug 22 15:42:26 173-168-58-139 systemd[1]: Stopped LSB: Start the MysqL database server.

可见,MysqL服务未启动。

4、启动MysqL服务

# /etc/init.d/MysqL startredirecting to systemctl start MysqLFailed to issue method call: Unit MysqL.service Failed to load: No such file or directory.

报错,无法启动MysqL服务。

用systemctl方法

# systemctl start MysqL.service

仍然报如下错误

Failed to issue method call: Unit MysqL.service Failed to load: No such file or directory. See system logs and 'systemctl status MysqL.service' for details.

5、解决方法

# systemctl enable MysqL.service

6、再次启动MysqL

# systemctl start MysqL# ps -ef | grep MysqLroot     27930     1  0 16:30 ?        00:00:00 /bin/sh /usr/bin/MysqLd_safe --datadir=/var/lib/MysqL --pID-file=/var/lib/MysqL/173-168-58-139.pIDMysqL    28045 27930  0 16:30 ?        00:00:00 /usr/sbin/MysqLd --basedir=/usr --datadir=/var/lib/MysqL --plugin-dir=/usr/lib64/MysqL/plugin --user=MysqL --log-error=/var/lib/MysqL/173-168-58-139.err --pID-file=/var/lib/MysqL/173-168-58-139.pIDroot     28074 25545  0 16:30 pts/1    00:00:00 grep --color=auto MysqL

可见,MysqL已经正常运行。

总结

以上是内存溢出为你收集整理的解决Failed to issue method call: Unit mysql.service failed to load: No such file or directory全部内容,希望文章能够帮你解决解决Failed to issue method call: Unit mysql.service failed to load: No such file or directory所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/1166153.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-01
下一篇 2022-06-01

发表评论

登录后才能评论

评论列表(0条)

保存