2014-05-13 15 views
3

安裝MySQL的73年5月1日之後的路,我已經添加了路徑變量如何改變MySQL的服務

C:\Program Files\MySQL\MySQL Server 5.1\bin 

我在命令行中嘗試:

"C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --install 

它顯示:

The service already exists! 
The current server installed: "c:\Program Files\MySQL\mysqld" --defaults-file=my.ini MySQL 

但你可以看到我設置的路徑是 「C:\ Program Files文件\的MySQL \ MySQL服務器5.1 \ BIN \ mysqld的」,而不是「C:\ Program Files文件\ MySQL的\ mysqld的」所以,當我鍵入毫無疑問:

net start mysql 

我得到:

System error 2 has occurred. 

The system cannot find the file specified. 

如何改變奇怪的錯誤的目錄?我從來沒有設置過這個錯誤的目錄。我的平臺是Windows 7企業版

回答

4

打開註冊表editör(regedit.exe),然後找到mysql服務(HKLM --> SYSTEM --> CurrentControlSet --> Services --> MySQL)並更正ImagePath設置。

另外,您可以在註冊表中搜索c:\Program Files\MySQL\mysqld並更改爲C:\Program Files\MySQL\MySQL Server 5.1\bin

2

,你最近安裝窗口,並沒有對某事的任何更新可能會出現此錯誤。我拿的是如下

  1. 從開始按鈕運行「regedit.exe」。
  2. 從內 「註冊表編輯器」 編輯 - >查找(按Ctrl + F)
  3. 使用 「mysql的」 作爲 「搜索鍵」
  4. 現在,你會發現下面的窗口

enter image description here

  1. 右鍵單擊[ImagePath]圖標並選擇「修改」。
  2. 輸入你的'mysqld.exe'完整路徑名,如上圖所示。

當我做了上述過程後,執行以下命令時沒有發生「系統錯誤2」。

DOS> net start mysql

祝您好運。