Failed to issue method call: Unit mysql. service failed to load: No such file or directory solution, issuemysql. service

Source: Internet
Author: User

Failed to issue method call: Unit mysql. service failed to load: No such file or directory solution, issuemysql. service

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

Author: chszs, reprinted with note. Blog homepage: http://blog.csdn.net/chszs

1. software environment:

OpenSUSE 13.1x64

MySQL 5.6.20 x64


2. Install MySQL 5.6.20 using an RPM package


# 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. view the MySQL Service



# /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.


The MySQL service is not started.


4. Start the MySQL Service


# /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.

An error is reported, and the MySQL service cannot be started.

Use systemctl

# systemctl start mysql.service
The following error is still reported:
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. Solution


# systemctl enable mysql.service



6. Start MySQL again


# 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
It can be seen that MySQL is running normally.



Install mysql in linux

Startup failed. The error message is incorrect.
 
For Linux and centos 7, telnet is not allowed.

The centos 7 service is started in systemd mode.

You can search for a large tutorial on centos 7 service systemctl.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.