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解决的方式

作者: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已被正确执行。

时间: 2024-08-25 06:29:48

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的解决办法

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.x8

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

可能的原因: 1.http://blog.sina.com.cn/s/blog_4692ea0a0101jqhz.html 2.http://diag.5ustore.com/proxy/index.php?url=1J1h12y31F1b1918yLyByU1FyNyjyD101z1612yo1C1cyc1sy3yc1yyN161611yY0RyiyiyJyY1hymylyj1hyL1gyS1LyWyR1Myhyk0VyMylyvyg0j1j1D1F1k18171r1P1HyuyI1DyNyB

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 to start iptables.service: Unit iptables.service failed to load: No such file or directory.解决方法如下: 一直用CentOS 6 习惯了,一下没适应过来.防火墙配置后执行service iptables sav

docker 无法启动,报错:Unit docker.socket failed to load: No such file or directory

问题:docker无法启动 错误:     Failed to start docker.service: Unit docker.socket failed to load: No such file or directory.      解决方法:     systemctl unmask docker.service     systemctl unmask docker.socket     systemctl start docker.service

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

防火墙配置后执行service iptables save 出现"Failed to restart iptables.service: Unit iptables.service failed to load: No such file or directory."错误,在CentOS 7或RHEL 7或Fedora中防火墙由firewalld来管理,当然你可以还原传统的管理方式.或则使用新的命令进行管理. 假如采用传统请执行一下命令: systemctl stop firewall

CentOS 7告iptables防火墙提示Unit iptables.service failed to load

使用CentOS 7时发现使用iptables防火墙时提示错误Unit iptables.service failed to load,意思是防火墙运行启动失败了,那么要如何处理呢. 一直用CentOS 6 习惯了,一下没适应过来.防火墙配置后执行service iptables save 出现"Failed to restart iptables.service: Unit iptables.service failed to load: No such file or directory.&

error: failed to connect to the hypervisor error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory 解决办法

服务器版本:CentOS Linux release 7.4 Linux lb 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux 参考:https://www.cnblogs.com/yogurtwu/p/9988974.html 注:在翻了很多baidu和google相关文章后,逐步排查,根据手动执行libvirtd命令出现的报错信息才查到解决方法.一路坑. 对装有k

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

打开 php.ini文件,找到这1行 mysql.default_socket 然后将它修改为 mysql.default_socket=/path/to/mysql.sock /path/to/mysql.sock是mysql的配置文件/etc/my.cnf中的socket的路径 如我当前虚拟机中的mysql 配置文件/etc/my.cnf的socket = /tmp/mysql.sock,所以修改php.ini中找到的mysql.default_socket =都改为mysql.defaul

nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)

在重启nginx服务的时候,出现了这个错误. [[email protected] etc]# nginx -c /var/run/nginx/nginx.pid nginx: [emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory) 解决办法: [[email protected] etc]# nginx -c /etc/nginx/nginx.conf 其他的一些解决办法: 1.进