簡體   English   中英

Wampserver 圖標沒有完全變綠,mysql 服務沒有啟動?

[英]Wampserver icon not going green fully, mysql services not starting up?

我正在localhost上運行一個應用程序,它已經成功運行了至少一年,但今天突然間 wampserver 沒有啟動。 每當我右鍵單擊任務欄圖標並“啟動所有服務”時,它都會變成橙色,但不會變成綠色。 昨天有一個數據丟失問題,因為其中一個 mysql 表崩潰並且必須修復,如果這與此有關的話。

如果我嘗試http://localhost/phpmyadmin ,我會收到403 Forbidden錯誤,這是我以前從未遇到過的。

我今天檢查了 apache 日志,它的最新條目是:

[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP   2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:25, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP Warning:  mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in D:\\wamp\\www\\zeejflow\\index_exe.php on line 25, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP   2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:25, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Warning:  mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: [2002] No connection could be made because the target machine actively  (trying to connect via tcp://localhost:3306) in D:\\wamp\\www\\zeejflow\\index_exe.php on line 26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP   2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Warning:  mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: No connection could be made because the target machine actively refused it.\r\n in D:\\wamp\\www\\zeejflow\\index_exe.php on line 26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP   2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Warning:  mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in D:\\wamp\\www\\zeejflow\\index_exe.php on line 26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP   2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP Warning:  mysql_num_rows() expects parameter 1 to be resource, integer given in D:\\wamp\\www\\zeejflow\\index_exe.php on line 34, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP   2. mysql_num_rows() D:\\wamp\\www\\zeejflow\\index_exe.php:34, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] an unknown filter was not added: DEFLATE
[Sat Jul 20 14:17:33 2013] [error] an unknown filter was not added: DEFLATE
[Sat Jul 20 14:17:33 2013] [error] an unknown filter was not added: DEFLATE

index_exe.php 上的第 25 和 26 行如下(我試圖登錄到應用程序):

$userName = mysql_real_escape_string($_POST['userName']);
$Password = mysql_real_escape_string($_POST['Password']);

由於[2002] No connection could be made because the target machine actively (trying to connect via tcp://localhost:3306錯誤連接,我想可能使用相同端口的其他應用程序有問題,所以我嘗試了以下操作(我的 wamp 在 D 上運行:):

C:\Users\admin>netstat

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    127.0.0.1:5939         localhost127:49313     ESTABLISHED
  TCP    127.0.0.1:5939         localhost127:49317     ESTABLISHED
  TCP    127.0.0.1:49155        localhost127:49156     ESTABLISHED
  TCP    127.0.0.1:49156        localhost127:49155     ESTABLISHED
  TCP    127.0.0.1:49157        localhost127:49158     ESTABLISHED
  TCP    127.0.0.1:49158        localhost127:49157     ESTABLISHED
  TCP    127.0.0.1:49311        localhost127:49312     ESTABLISHED
  TCP    127.0.0.1:49312        localhost127:49311     ESTABLISHED
  TCP    127.0.0.1:49313        localhost127:5939      ESTABLISHED
  TCP    127.0.0.1:49315        localhost127:49316     ESTABLISHED
  TCP    127.0.0.1:49316        localhost127:49315     ESTABLISHED
  TCP    127.0.0.1:49317        localhost127:5939      ESTABLISHED
  TCP    127.0.0.1:49320        localhost127:49321     ESTABLISHED
  TCP    127.0.0.1:49321        localhost127:49320     ESTABLISHED
  TCP    192.168.15.200:49166   server6201:5938        ESTABLISHED
  TCP    192.168.15.200:49847   Server-PC:netbios-ssn  TIME_WAIT
  TCP    192.168.15.200:49848   Server-PC:netbios-ssn  TIME_WAIT

D:\>netstat

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    127.0.0.1:80           localhost127:49799     TIME_WAIT
  TCP    127.0.0.1:80           localhost127:49800     TIME_WAIT
  TCP    127.0.0.1:80           localhost127:49801     TIME_WAIT
  TCP    127.0.0.1:80           localhost127:49802     TIME_WAIT
  TCP    127.0.0.1:80           localhost127:49803     TIME_WAIT
  TCP    127.0.0.1:80           localhost127:49804     TIME_WAIT
  TCP    127.0.0.1:80           localhost127:49806     TIME_WAIT
  TCP    127.0.0.1:80           localhost127:49810     TIME_WAIT
  TCP    127.0.0.1:80           localhost127:49811     TIME_WAIT
  TCP    127.0.0.1:5939         localhost127:49313     ESTABLISHED
  TCP    127.0.0.1:5939         localhost127:49317     ESTABLISHED
  TCP    127.0.0.1:49155        localhost127:49156     ESTABLISHED
  TCP    127.0.0.1:49156        localhost127:49155     ESTABLISHED
  TCP    127.0.0.1:49157        localhost127:49158     ESTABLISHED
  TCP    127.0.0.1:49158        localhost127:49157     ESTABLISHED
  TCP    127.0.0.1:49311        localhost127:49312     ESTABLISHED
  TCP    127.0.0.1:49312        localhost127:49311     ESTABLISHED
  TCP    127.0.0.1:49313        localhost127:5939      ESTABLISHED
  TCP    127.0.0.1:49315        localhost127:49316     ESTABLISHED
  TCP    127.0.0.1:49316        localhost127:49315     ESTABLISHED
  TCP    127.0.0.1:49317        localhost127:5939      ESTABLISHED
  TCP    127.0.0.1:49320        localhost127:49321     ESTABLISHED
  TCP    127.0.0.1:49321        localhost127:49320     ESTABLISHED
  TCP    192.168.15.200:49166   server6201:5938        ESTABLISHED
  TCP    192.168.15.200:49805   mrs02s05-in-f4:http    ESTABLISHED

但現在我不知道該怎么辦。 我確保 my.ini 指定了端口 3306,並且它已經指定了(無論如何一年內沒有人更改它怎么會突然有另一個值)。 請任何幫助! 我認為 Apache 正在工作,因為當我輸入http://localhost ,它可以工作並提供轉到 phpmyadmin 或我的應用程序文件夾的選項,但似乎 mysql 服務沒有啟動或什么的? 我與管理員確認並沒有安裝任何新軟件(例如 Skype)或任何東西。

更新

我去了Services.msc並檢查了wampapache ,狀態為“已啟動”。 但是wampmysqld沒有狀態。 所以我右鍵單擊並選擇“開始”。 一條消息說“Windows 正在嘗試在本地計算機上啟動該服務”,但隨后出現此錯誤:

Windows could not start the wampmysqld service on Local Computer
Error 1067: The process terminated unexpectedly

這到底是怎么回事? :(

更新 2

我讓 mysql 再次工作,在這里:

mysqld 工作但 wampmysqld 沒有啟動

然而, localhost://phpmyadmin仍然給我一個403 forbidden錯誤,而mysql_connect不斷給我一個“拒絕訪問”錯誤。

這件事今天發生在我身上。 由於我從昨天起就沒有更改系統設置,因此我認為這主要是系統上的 mysql 問題。 我設法通過以下方式修復它。

  1. 打開 wampserver 的 mysql 日志文件。 這將包含有關服務為何拋出、錯誤和過早退出的信息。

  2. 就我而言,mysql 服務無法啟動,因為它無法讀取某個表空間。 日志中指明了特定的表空間。

  3. 無法讀取此類文件可能是因為文件權限或文件已損壞。 在這種情況下,mysql 停止執行以避免損壞可能鏈接到您需要的數據庫的表空間文件。 通常,如果您有數據庫的備份,那么只需刪除這個有問題的文件並在您的 mysql 服務再次啟動后恢復數據庫是安全的。

  4. 如果您沒有數據庫備份,那么您可以通過啟用 my.cnf / my.ini 文件中的選項來強制 mysql 實例運行恢復。

innodb_force_recovery = 1

這會強制實例運行崩潰恢復。

注意:安裝新的 mysql 實例並不一定意味着您的數據庫將被保留。 如果您正在處理大型項目,我建議您每晚對數據庫進行一次備份。

轉到: wamp\\bin\\mysql\\mysql5.6.17\\data並刪除以下內容:

auto.cnf , xxxxxxxxx.err , xxxxxxxxx.pid , ib_logfile0ib_logfile1

保留其他文件原樣。

如果是 Skype 占用了您的 80 端口,則轉到 Skype:工具>選項並提前>連接取消選中“使用端口 80 和 443 ......”

我遇到了同樣的問題,為了解決它,我在 my.ini 中添加了以下行

innodb_force_recovery = 1

我運行 Wamp Server 一年多了,
現在我遇到了無法啟動 Wamp 服務器的問題(圖標只是保持紅色並出現錯誤消息)

我設法卸載 Wamp 並重新安裝它,所以我做到了,但在此之前我將文件夾從 mysql/data 復制到我的桌面,然后當我重新安裝它時,我將該文件復制到原始位置。

然后 mysql 就糊塗了……而且 phpmyadmin 無法正常工作,所以我通過恢復全新的安裝文件夾內容來解決這個問題。
但我無法啟動 mysql(wamp 服務器圖標仍為黃色)

因此,在我搜索了很多之后,我刪除了 mysql/data 中的所有內容,除了:-

mysql
test
performance_schema

我的問題解決了:)

我有同樣的問題...

WampServer 自 2 月以來在我的本地開發服務器上運行良好。 今天我無法讓它運行。

轉到谷歌,在那里我找到了這個頁面,直到我看到最后一個條目才找到答案:

”1.運行WampServer:Apache->服務->測試80端口。

2.找出占用80端口的應用程序(例如Skype)”

也是如此,它返回說 Skype 可能阻止了端口 80。

關掉Skype,問題就解決了。

我有同樣的問題。 Mysql 沒有啟動。

  1. 去服務。
  2. 右鍵單擊 wampmysqld 轉到屬性。
  3. 啟動類型選擇手動。
  4. 右鍵單擊並單擊啟動服務。

為我工作。

對我來說,將innodb_force_recovery=3添加到my.ini解決了這個問題

另一種選擇是從數據目錄中刪除ibdata文件和所有ib_logfile ,如MySQL 文檔中所述 但是,這將導致任何 innoDB 表不起作用(因為某些信息存儲在ibdata1 中

您可能想要從 MySQL 重置數據

  • 從 C:\\wamp\\bin\\mysql\\mysql5.6.17\\data 刪除以前的數據
  • 重啟服務

我有類似的問題,所以我搜索谷歌。 這篇文章肯定會幫助你: 解決黃色 - wamp-server-status-freeing-up-port-80-for-apache

謝謝

刪除此文件中的所有內容。

C:\wamp\bin\mysql\mysql5.1.36\data\mysql-bin.index

重新啟動 mysql 服務器,它應該可以工作。

  1. 運行 WampServer:Apache->service->test 80 端口。

  2. 找出占用80端口的應用程序(例如Skype)

  3. 關閉並重新啟動 WampServer。

我從命令提示符打開了 services.msc 並禁用了SQL Server 報告服務

& SQL Server 分析服務 這些服務使用端口 80。

然后我重新啟動了 WAMP 服務器,它開始像以前一樣正常工作。

我已經完全卸載了 WampServer,並刪除了 /wamp 文件夾中的所有文件,除了 www。 卸載時會保留此文件夾。 之后我又安裝了它,它工作正常。

重要提示:這僅在您已備份數據庫的情況下有用。 數據庫中的所有數據都將通過這種方式被清除。

刪除此文件中的所有內容。

C:\\wamp\\bin\\mysql\\mysql5.1.36\\data\\mysql-bin.index

這個對我有用。 我的 wamp 服務器變綠了。 Tnx 很多

  1. 單擊 wamp(黃色)圖標

  2. 去 Apache-> 服務-> 測試端口 80。如果端口可用,然后去 Apache-> 服務-> 安裝服務

  3. 然后單擊重新啟動所有服務。

您是否嘗試過更改 MySQL 的端口號並查看它是否有效?

  1. 右鍵單擊您的 WAMP 圖標

  2. 選擇 MySQL,在菜單中選擇“使用 3306 以外的端口”

  3. 將端口號更改為“3307”

我有一個非常相似的問題,經過多次嘗試甚至這個問題中的解決方案后,我得出了這個 OTHER ANSWER 的結論。

我沒有在這里復制它,因為這不是正確的做法。

基本上是關於重新安裝 MySQL(或整個包),確保很好地刪除舊的 mysql-data(如果您可能需要它,請備份它)並堅持使用 32 位版本。

最簡單的方法是找到其他服務使用與 mysql 在 windows 中相同的服務 ID。

當我查看在我的電腦上運行的服務列表時(即使在重新啟動后......我仍然有問題)

我很快意識到我在 wamp 服務器之前在我的計算機上安裝了 webmatrix...webmatrix 安裝了自己的 mysql 副本並將其設置為每次登錄時自動啟動另一個實例。

一旦與 Web 矩陣關聯的另一個 mysql 實例停止(並從自動啟動更改為手動),我的 WAMP mysql 問題就解決了。

我遇到了同樣的問題,wampmysqld64 沒有啟動,所以我檢查了 Mysql 日志,你應該在 wamp64 主文件夾中找到它,我找到了關於為什么不工作的所有細節。 在我的計算機上,我發現另一個 mysql 實例正在運行,因此它阻止 wampmysqld64 啟動。 我停止了另一個實例,之后一切正常。

我已經通過以下步驟解決了我的問題:

  • 在 windows 平台上按 WINDOWS + R
  • 放入 services.msc 並按 OK
  • 停止已經運行的 MySQL 和
  • 轉到 Wamp 並啟動​​/恢復 MySQL 服務

一切順利

單擊 wampserver 圖標,然后 -> Apache -> httpd.conf -> 在這里搜索偵聽,您會找到這樣的端口號#Listen 12.34.56.78:80 Listen 80 將此端口號更改為任何其他數字,如Listen 12.34.56.78:81 save現在重新啟動所有服務器,它會從綠色變為橙色。

過去 3 天我有同樣的問題。 試試這個。 它肯定會起作用。 在繼續安裝 Wampserver 之前,您必須確保您的系統上安裝了某些元素,否則 Wampserver 將絕對無法運行,此外,安裝會出錯,您需要在安裝缺少的元素之前刪除 Wampserver . 卸載 wamp 並下載並安裝 microsoft visual c++ redistributable 2008 ( https://www.microsoft.com/en-in/download/details.aspx?id=29 )、microsoft visual c++ redistributable 2012 ( https://www.microsoft .com/en-in/download/details.aspx?id=30679 ),微軟 Visual C++ 可再發行 2015 ( https://www.microsoft.com/en-in/download/details.aspx?id=48145 )。 現在,重新安裝 wamp,它應該可以正常工作。

哇..這對我有用。 卸載 wamp 服務器確保此依賴項已成功安裝Microsoft Visual C++ Redistributable Packages vcredist_Allversions(x32 orx64),具體取決於您的操作系統。 重新安裝 wamp 服務器,一切順利。 謝謝

- 轉到任務管理器 - 結束 mysql 的所有任務實例 - 重新啟動您的 wampserver

基本上,當您在安裝 Wampserver 時未在計算機上安裝預先安裝的必需軟件時,會發生這種情況,您可能在安裝時遇到以下錯誤。

program can't start because msvcr120.dll is missing OR

program can't start because msvcr120.dll is missing

如果您在安裝 wampserver 后解決了這些問題,那么您可能會遇到此問題。

然后您可以簡單地再次卸載並安裝 wamp 服務器

如果您還沒有安裝預先需要的依賴項,那么首先卸載 wampserver 。 然后首先安裝預要求,最后你可以安裝 Wampserver,它現在應該可以工作了。

您可以從以下鏈接下載預先要求的應用程序

對於 x64 機器

微軟 Visual C++ 2010 可再發行包 (x64) https://www.microsoft.com/en-in/download/details.aspx?id=14632

Visual C++ Redistributable for Visual Studio 2012 Update 4 https://www.microsoft.com/en-in/download/details.aspx?id=30679

Visual Studio 2013 的 Visual C++ 可再發行包https://www.microsoft.com/en-in/download/details.aspx?id=40784

適用於 Visual Studio 2015 的 Visual C++ Redistributable https://www.microsoft.com/en-in/download/details.aspx?id=48145

對於 x86 機器

Microsoft Visual C++ 2010 Redistributable Package (x86) https://www.microsoft.com/en-in/download/details.aspx?id=14632

Visual C++ Redistributable for Visual Studio 2012 Update 4 https://www.microsoft.com/en-in/download/details.aspx?id=30679

Visual Studio 2013 的 Visual C++ 可再發行包https://www.microsoft.com/en-in/download/details.aspx?id=40784

適用於 Visual Studio 2015 的 Visual C++ Redistributable https://www.microsoft.com/en-in/download/details.aspx?id=48145

注意:- 在卸載之前備份您的項目文件

我的問題是 wampmysqld64 服務被禁用了,所以我去:任務管理器 > 服務 > 右鍵單擊​​ wampmysqld64 然后屬性,另一個窗口會打開,查找 wampmysqld64 服務然后右鍵單擊然后單擊屬性,一個窗口會彈出:

wampmysqld64 屬性窗口

在“啟動類型”上,只需將其從禁用更改為自動,然后返回單擊該服務並運行它,就是它的 wamp 標志,它會變成綠色。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM