Failed to issue method call: Unitmysql.service failed to load: No such file or directory.
2017-02-21 01:24
701 查看
腾讯云的服务器重启之后访问不到/var/www/html目录下的项目,我想有可能是httpd的问题(Linux安装的lamp,默认的文档目录是/var/www/html)。
执行service httpd restart 命令之后,得以解决这个问题。但是又发现一个问题,那就是数据库访问不到,用命令service mysqld start去重新启动却报如下的错误信息:
[root@VM_203_146_centos bin]# service mysql start
Redirecting to /bin/systemctl start mysql.service
Failed to issue method call: Unitmysql.service failed to load: No such file or directory.
解决方法:
执行以下两条命令
1、yum install mariadb-server
systemctl start mariadb
然后就可以正常使用啦
2、如果接下来数据库出现2003错误的话,有可能是数据库的启动方式不对
用命令ps -ef|grep mysql 来显示包含mysql字符的系统执行过程。查看是mysql的启动方式
如果是socket的话,需要改成port方式形式。
解决方法:
需要进入到/etc/my.cnf文件中
执行service httpd restart 命令之后,得以解决这个问题。但是又发现一个问题,那就是数据库访问不到,用命令service mysqld start去重新启动却报如下的错误信息:
[root@VM_203_146_centos bin]# service mysql start
Redirecting to /bin/systemctl start mysql.service
Failed to issue method call: Unitmysql.service failed to load: No such file or directory.
解决方法:
执行以下两条命令
1、yum install mariadb-server
systemctl start mariadb
然后就可以正常使用啦
2、如果接下来数据库出现2003错误的话,有可能是数据库的启动方式不对
用命令ps -ef|grep mysql 来显示包含mysql字符的系统执行过程。查看是mysql的启动方式
如果是socket的话,需要改成port方式形式。
解决方法:
需要进入到/etc/my.cnf文件中
相关文章推荐
- 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的解决办法
- Failed to issue method call: Unit httpd.service failed to load: No such file or directory.
- Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.
- Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.
- Failed to issue method call: Unit ssh.service failed to load: No such file or directory.
- 解决CentOS 7出现Failed to issue method call: Unit iptables.service failed to load: No such file or direc
- Centos7与Fedora24安装mysql后无法启动,提示 Unit mysql.service failed to load:No such file or directory
- Centos7与Fedora24安装mysql后无法启动,提示 Unit mysql.service failed to load:No such file or directory
- Mysql启动报错:Unit mysql.service failed to load: No such file or directory的解决办法
- mysql不能启动:Unit mysql.service failed to load: No such file or directory的解决办法
- Centos安装mysql后无法启动,提示 Unit mysql.service failed to load:No such file or directory
- Centos7与Fedora24安装mysql后无法启动,提示 Unit mysql.service failed to load:No such file or directory
- CentOS7关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory
- 解决CentOS7关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory.
- 解决CentOS7关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory.
- Failed to restart network.service: Unit network.service failed to load: No such file or directory.
- 解决CentOS7关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory.