打开APP
userphoto
未登录

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

开通VIP
mysql不能启动: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的解决办法

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

1、软件环境:

OpenSUSE 13.1 x64

MySQL 5.6.20 x64


2、采用RPM包安装mysql 5.6.20

[python] view plain copy
  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服务
[javascript] view plain copy
  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服务
[javascript] view plain copy
  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方法

[javascript] view plain copy
  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、解决方法

[javascript] view plain copy
  1. # systemctl enable mysql.service  


6、再次启动MySQL
[javascript] view plain copy
  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

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
解决CentOS7关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory.
centos7 无法启动网络(service network restart)错误解决办法
Linux Systemd 详细介绍: Unit、Unit File、Systemctl、Target
Centos7中systemctl命令详解
Centos7 安装配置Mysql
服务启动文件分析
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服