Failed to issue method call: Unit mysql.serv

系统 1743 0

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

作者:chszs。转载需注明。博客主页: http://blog.csdn.net/chszs

1、软件环境:

OpenSUSE 13.1 x64

MySQL 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 status
MySQL is not running                                                                                                    failed
mysql.service
   Loaded: 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 start
redirecting to systemctl start mysql
Failed 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 mysql
root     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.pid mysql 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.pid root 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解决的方式


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论