mysqld_safe啟動報錯 mysqld_safe The file /usr/local/mysql/bin/mysqld does not exist or is not executable


報錯(如下),但是使用mysqld直接啟動沒有問題。

[sql]  view plain copy
  1. 150718 00:03:38 mysqld_safe Logging to '/var/log/mysqld.log'.  
  2. 150718 00:03:38 mysqld_safe The file /usr/local/mysql/bin/mysqld  
  3. does not exist or is not executable. Please cd to the mysql installation  
  4. directory and restart this script from there as follows:  
  5. ./bin/mysqld_safe&  
  6. See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information  
  7.   
  8. [1]+  Exit 1                  mysqld_safe --skip-grant-tables --user=mysql  

說明:mysqld_safe啟動腳本默認的從/usr/local/mysql目錄中讀取另外一個啟動腳本mysqld,因為我的安裝目錄為/home/mysql/product/5.6/mysql-1。所以找不到相關文件。可以從兩個方面解決。

方法一:在/usr/local/mysql創建鏈接文件

[sql]  view plain copy
  1. mkdir -p /usr/local/mysql/bin  
  2. ln -s /home/mysql/product/5.6/mysql-1/bin/mysqld /usr/local/mysql/bin/mysqld  

方法二:將mysqld_safe中的所有/usr/local/mysql目錄改為自己實際的安裝目錄

[sql]  view plain copy
  1. <pre name="code" class="sql">sed -i 's#/usr/local/mysql#/home/mysql/product/5.6/mysql-1#g' /home/mysql/product/5.6/mysql-1/bin/mysqld_safe  

再次啟動成功。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM