Failed to issue method call: Unit mysql.service failed to load: No such file or directory的解決辦法

來源:互聯網
上載者:User

標籤:mysql   opensuse   mysql 5.6   

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 statusMySQL is not running                                                                                                    failedmysql.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 startredirecting to systemctl start mysqlFailed 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 mysqlroot     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.pidmysql    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.pidroot     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的解決辦法

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.