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

來源:互聯網
上載者:User

標籤:找不到   cto   bag   沒有   啟動指令碼   .net   for   grant   ted   

報錯(如下),但是使用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  

再次啟動成功。

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.