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解决的方式的更多相关文章

  1. Failed to issue method call: Unit httpd.service failed to load: No such file or directory.

    centos7修改httpd.service后运行systemctl restart httpd.service提示 Failed to issue method call: Unit httpd.s ...

  2. Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.

    国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...

  3. CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load

    错误信息如下: [root]# service iptables start Redirecting to /bin/systemctl start iptables.service Failed t ...

  4. 解决 RHEL 7/ CentOS 7/Fedora 出现Unit iptables.service failed to load

    一直用CentOS 6 习惯了,一下没适应过来.防火墙配置后执行service iptables save 出现”Failed to restart iptables.service: Unit ip ...

  5. CentOS7关闭/开启防火墙出现 Unit iptables.service failed to load

    在vm中安装好tomcat,而且在liunx中使用nc命令可以返回成功,但是更换到window中访问不到tomcat的情况,是由于linux防火墙的问题造成的,传统的解决方式有2中 第一种解决方案: ...

  6. 解决CentOS7关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory.

    CentOS7中执行 service iptables start/stop 会报错Failed to start iptables.service: Unit iptables.service fa ...

  7. CentOS 7.x关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory问题解决

    一直用CentOS 6.x,今天用CentOS7.3版本时,防火墙配置后执行service iptables start出现”Failed to restart iptables.service: U ...

  8. php 连接mysql 主机 localhost,显示 No such file or directory

    打开 php.ini文件,找到这1行 mysql.default_socket 然后将它修改为 mysql.default_socket=/path/to/mysql.sock /path/to/my ...

  9. 服务器宕机,mysql无法启动,job for mysql.service failed because the process exited with error code,数据库备份与恢复

    [问题现象] 服务器在运行过程中,因人为意外导致电源被拔,服务器宕机,mysql重启不成功,报错如下 根据提示,输入systemctl status mysql.service和journalctl ...

随机推荐

  1. 怎么样Ubuntu正在使用root账号登录

    一个. 因为当你需要 root 权限,使用 sudo 我们将能够做到这一点.假设你真的需要在 Ubuntu 启用 root 帐户的话,这是最好的运行下面的操作: 1.再次设置 root 的passwo ...

  2. 例如找出令人信服的权威C++中间malloc与new

    例如找出令人信服的权威C++中间malloc与new 问题: 非常多人都知道malloc与new都是用来申请空间用的,开辟空间来源于堆中. 可是在C++中却非常少用malloc去申请空间,为什么? 以 ...

  3. 熟人Dubbo 系列1-Dubbo什么

    Dubbo阿里巴巴内部SOA治理方案和服务的核心框架.每天2000+ 个服务提供3,000,000,000+ 次訪问量支持,并被广泛应用于阿里巴巴集团的各成员网站.Dubbo自2011年开源后,已被很 ...

  4. 在ABP项目的应用Castle Windsor

    Castle Windsor常用介绍以及其在ABP项目的应用介绍 最近在研究ABP项目,有关ABP的介绍请看阳光铭睿 博客,ABP的DI和AOP框架用的是Castle Windsor下面就对Castl ...

  5. DFT 展开式和 FFT推导

    C语言的FFT //---------------------------------------------------------------------------------- //----- ...

  6. nodejs使用connect-mongodb报错(Please ensure that you set the default write concern)

    原本是使用connect-mongo的,可能是express版本号的升级报错了.改用connect-mongodb.可是使用后出现了例如以下的警告: G:\nodejs\moviesite>gr ...

  7. SSH-Struts(两)—调节器(ActionServlet)

    第一部分介绍的博客Struts架构,下一节介绍中特定成分,这个博客是写Struts控制器ActionServlet. 扮演的角色 ActionServlet类是Struts的控制中心,全部来自于浏览器 ...

  8. Windows 2008 卸载 IIS7 批处理

    @echo offcolor 0aecho 正在卸载IIS功能,这可能需要几分钟时间...start /w pkgmgr /uu:IIS-WebServerRole;WAS-WindowsActiva ...

  9. 30分钟让你了解MongoDB基本操作(转)

    今天记录下MongoDB的基本操作,这只是最基本的,所以是应该掌握的. 数据库 数据库是一个物理容器集合.每个数据库都有自己的一套文件系统上的文件.一个单一的MongoDB服务器通常有多个数据库. 集 ...

  10. MVC基本概念和流程

    MVC基本概念和流程 MVC的概念 Model(模型):包含数据和行为.不过现在一般都分离开来:Value Object(数据) 和 服务层(行为). View(视图):负责进行模型的展示,一般就是展 ...