win7下安裝Mysql 開機自啟動,win7mysql

來源:互聯網
上載者:User

win7下安裝Mysql 開機自啟動,win7mysql

1.下載安裝MySql,我用的是MySQL_5.6.24_winx64_XiaZaiBa,解壓到一個磁碟下面,我這裡安裝到D盤,D:\install\MySQL\MySQL Server 5.6。

2.設定系統內容變數,為了方便,在Windows環境變數的系統變數的PATH中添加MYSQL的bin檔案夾路徑(如:D:\install\MySQL\MySQL Server 5.6\bin),不需要在D:\mysql-5.5.23-win32\bin目錄下運行。


3.接下去讓我們開始試著將MYSQL服務添加進winsows services.msc,直接在cmd的命令列模式下輸入mysqld --install MySQL --defaults-file="D:\install\MySQL\MySQL Server 5.6\bin\my.ini"
成功後,開始->運行->services.msc 找MySQL服務,啟動服務即可。


註:若啟動不成功 修改註冊表開始->運行->regedit
找HKEY_LOCAL_MECHINE---SYSTEM ---ControlSet001或ControlSet002中找Services,再找MySQL項,修改 ImagePath 值改為:"D:\install\MySQL\MySQL Server 5.6\bin\mysqld" --defaults-file="D:\install\MySQL\MySQL Server 5.6\bin\my.ini" MySQL


 配置開機自啟動時出現問題:
安裝mysql服務出現Install/Remove of the Service Denied!錯誤
許可權問題,開啟cmd.exe,不過這次要右擊“Run as administrator”,恩,然後再鍵入mysqld --install,即可

相關文章

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.