mysql不能启动:Unit mysql.service failed to load: No such file or directory的解决办法

65 篇文章 1 订阅

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

  1. # rpm -ivh MySQL-server-5.6.20-1.sles11.x86_64.rpm  
  2. # rpm -ivh MySQL-client-5.6.20-1.sles11.x86_64.rpm  
  3. # rpm -ivh MySQL-devel-5.6.20-1.sles11.x86_64.rpm  
  4. # rpm -ivh MySQL-shared-5.6.20-1.sles11.x86_64.rpm  

3、查看MySQL服务
  1. # /etc/init.d/mysql status  
  2. MySQL is not running                                                                                                    failed  
  3. mysql.service  
  4.    Loaded: not-found (Reason: No such file or directory)  
  5.    Active: inactive (dead)  
  6. Aug 22 15:42:26 173-168-58-139 systemd[1]: Stopped LSB: Start the MySQL database server.  

可见,MySQL服务未启动。


4、启动MySQL服务
  1. # /etc/init.d/mysql start  
  2. redirecting to systemctl start mysql  
  3. Failed to issue method call: Unit mysql.service failed to load: No such file or directory.  

报错,无法启动MySQL服务。

用systemctl方法

  1. # 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、解决方法

  1. # systemctl enable mysql.service  


6、再次启动MySQL
  1. # systemctl start mysql  
  2. # ps -ef | grep mysql  
  3. 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  
  4. 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  
  5. root     28074 25545  0 16:30 pts/1    00:00:00 grep --color=auto mysql  

可见,MySQL已经正常运行。

来自:http://blog.csdn.net/chszs/article/details/38758713

  • 3
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

VCHH

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值