mysql: command not found問題解決,mysqlfound

來源:互聯網
上載者:User

mysql: command not found問題解決,mysqlfound
編譯安裝mysql後經常碰到這個問題,明明有安裝mysql的嘛
根本原因在於:mysql命令沒有載入到目前使用者的環境變數中
解決辦法

#find  / -name mysql

/usr/local/mysql/bin/mysql


方法1:臨時解決辦法
建立連結檔案:
ln -s /usr/local/mysql/bin/mysql /usr/bin


方法2:永久解決辦法
將mysql的bin目錄加入環境變數

#echo "export PATH=/usr/local/mysql/bin:\$PATH" >> /root/.bash_profile

#source  /root/.bash_profile

相關文章

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.