Wampserver icon not going green fully, mysql services not starting up?
Asked Answered
D

25

13

I'm running an application on localhost, it's been running successfully for at least a year now, but suddenly today wampserver isn't starting up. Whenever I rightclick on the taskbar icon and "start all services", it gets orange, but never green. Yesterday there was a data loss problem because one of the mysql tables crashed and had to be repaired, if that's related to this in any way.

If I try http://localhost/phpmyadmin, I get a 403 Forbidden error, which I never got before.

I checked the apache log today and its latest entries are:

[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

Lines 25 and 26 on index_exe.php are simply as below (I was trying to log in to the application):

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

Because of the [2002] No connection could be made because the target machine actively (trying to connect via tcp://localhost:3306 error, I figured maybe there's a problem with some other application using the same port, so I tried the following (my wamp is running on 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

But now I don't know what to make of this. I made sure my.ini had specified port 3306, and it had (anyway noone changed it in a year how could it suddenly have another value). Any help please! I think Apache is working because when I type in http://localhost, it works and gives the option to go to phpmyadmin or my application folder, but it appears mysql services aren't starting up or something? I confirmed with the admin and no new software (such as Skype) have been installed or anything.

Update

I went to Services.msc and checked wampapache, the status was "started". But wampmysqld had no status. So I right-clicked and chose "Start". A message said "Windows is attempting to start the service on the local computer", but then I got this error:

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

What on earth is up? :(

Update 2

I got the mysql working again, here:

mysqld working but wampmysqld not starting up

HowEVER, localhost://phpmyadmin still gives me a 403 forbidden error, and mysql_connect keeps giving me an "Access denied" error.

Dead answered 20/7, 2013 at 11:47 Comment(1)
You need to look at your Windows Event Viewer and in the Application section look for messages from MYSQL. There may well be a better more specific erro message in there.Mercuric
P
15

Go to: wamp\bin\mysql\mysql5.6.17\data and delete the following:

auto.cnf, xxxxxxxxx.err, xxxxxxxxx.pid, ib_logfile0 and ib_logfile1

leave other file as it is.

if it is skype that is occupying your port 80 then go to skype: tools>option and in advance>connection uncheck "use port 80 and 443......"

Panegyric answered 22/12, 2015 at 11:8 Comment(3)
thanks. That works for me, and it is the only solution, which is works for me. You guy is really great....Gereld
there is not data folder for meMra
Worked for me too. Also if anyone is unable to delete the log files Goto TaskManager > mysqld > EndTask > Exit wamp and deleteHoodmanblind
U
13

This happened to me today. Since I had not changed my system setting since yesterday, I assumed it's predominantly a mysql issue on the system. I managed to fix it in the following way.

  1. Open wampserver's mysql log file. This will contain information on why the service threw and error and exited prematurely.

  2. In my case, the mysql service failed to start because it could not read a certain tablespace. The specific tablespace was indicated in the log.

  3. Failure to read such a file could be because of file permissions or the file being broken. In such a case, mysql stops executing in order to avoid damaging a tablespace file that may be linked to a database you need. Usually, if you have a backup of the database, then it is safe to simply delete this problematic file and restore the database once your mysql service is started again.

  4. If you do not have a database backup then you could force the mysql instance to run a recovery by enabling the option in your my.cnf / my.ini file.

innodb_force_recovery = 1

This forces the instance to run the crash recovery.

NOTE: installing a new instance of mysql does not necessarily mean that your databases shall be retained. I suggest you run a nightly backup of your databases if you are working on huge projects.

Umbilication answered 4/10, 2013 at 7:15 Comment(0)
Y
8

I had the same issue, to resolve it I added the following line to my.ini

innodb_force_recovery = 1
Yahrzeit answered 4/3, 2015 at 14:2 Comment(0)
I
5

I was running Wamp Server for more than a year,
Now I faced a problem that I couldn't start Wamp server (The icon just stay red and the error message appear)

I managed to uninstall Wamp and reinstall it again, and so I did, but before that I copied the folder from mysql/data to my desktop then when I reinstall it I copied that files to the original location.

Then mysql just got confused... And phpmyadmin is not working so I fixed that by restoring the fresh install folder contents..
But I couldn't start mysql (the wamp servers icon still on yellow)

So after I googled a lot, I deleted every thing in the mysql/data except for:-

mysql
test
performance_schema

And my problem solved :)

Inmate answered 19/12, 2014 at 1:13 Comment(2)
I am using wampServer3.0.9, no need reinstall and just follow your instruction, delete all the files except database folder. Than restart all the service, and working fine now.Ballon
Wow, re-reading that after almost 4 years. I barely understood that. I may have to go edit it for future reference. Glad it worked for you.Inmate
W
4

I had this same problem...

WampServer has been running fine since Feb on my local dev server. Today I couldn't get it to run.

Off to google where I found this page and found no answers until I saw the last entry:

"1.Run WampServer: Apache->service->test port 80.

2.Find out application which occupation port 80(e.g. skype)"

So did and it returned that Skype was possibly blocking port 80.

Turned off Skype and the problem was solved.

Why answered 28/4, 2014 at 23:33 Comment(0)
Y
3

-Go to Task Manger -End all task instances of mysql -restart your wampserver

Yamauchi answered 14/5, 2020 at 13:54 Comment(0)
M
2

I had the same problem. Mysql didn't start.

  1. go to services.
  2. right click the wampmysqld go to properties.
  3. startup type select manual.
  4. right click and click start service.

worked for me.

Musick answered 23/10, 2014 at 8:14 Comment(0)
P
1

For me, adding innodb_force_recovery=3 to my.ini solved the issue

Another option is removing ibdata files and all ib_logfile from the data directory , as explained in MySQL docs here. However this will cause any innoDB tables not to work(because the some information stored in ibdata1)

Perfume answered 17/2, 2015 at 3:42 Comment(0)
C
1

You may want to reset data from MySQL

  • delete previous data from C:\wamp\bin\mysql\mysql5.6.17\data
  • restart service
Cutanddried answered 4/7, 2015 at 10:31 Comment(0)
P
0

Delete everything from this file.

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

Restart mysql server and it should work.

Pollak answered 28/1, 2014 at 8:18 Comment(1)
no, the answer for this case is doing what @Umbilication suggested and is adding innodb_force_recovery = 1 in [wampmysqld] section.Loblolly
P
0
  1. Run WampServer: Apache->service->test port 80.

  2. Find out what application which occupies the port 80(e.g. skype)

  3. Shut down and restarts WampServer.

Provo answered 26/2, 2014 at 3:35 Comment(0)
G
0

I opened up services.msc from the command prompt and disabled SQL Server reporting services

& SQL Server analysis services. These services were using port 80.

Then I restarted WAMP Server and it started working properly as before.

Gabel answered 21/5, 2014 at 11:44 Comment(0)
C
0

I have uninstalled the WampServer completelly, and deleted all files in /wamp folder, except www. This folder is preserved when uninstalling. After that I've installed it again and it works fine.

Important: This is helpful only in case when you already have your database backed up. All data from the database will be wiped out this way.

Cade answered 24/5, 2014 at 22:0 Comment(0)
G
0

Delete everything from this file.

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

It works for me. My wamp server has turned green. Tnx a lot

Goer answered 10/6, 2015 at 4:27 Comment(0)
P
0
  1. Click on wamp (Yellow) icon

  2. Go Apache-> Service-> Test port 80. If port is available to use then go to Apache->Service-> Install Service

  3. then click on Restart All Services.

Paratuberculosis answered 1/11, 2015 at 11:33 Comment(0)
S
0

Have you tried just changing the port number of MySQL and see if it works?

  1. Right click your WAMP icon

  2. Choose MySQL, in the menu choose "Use a port other than 3306"

  3. Change port number to be "3307"

Saunderson answered 7/5, 2016 at 10:6 Comment(0)
P
0

I've got a very similar problem, after a lot trying even the solutions in this question I concluded with THIS OTHER ANSWER.

I didn't replicated it here because it is NOT A CORRECT THING TO DO.

Basically is about re-installing MySQL (or the entire package) being sure to delete very well the old my-sql-data very well (back it up if you might need it) and stick on using 32 bit versions.

Panama answered 10/6, 2016 at 16:19 Comment(0)
K
0

simplest this to do is find what other service is using the same service id as mysql does in windows.

When i looked through the list of services running on my pc (even after a restart...i still had the problem)

I quickly realised i had webmatrix installed on my computer previous to wamp server...webmatrix installed its own copy of mysql and set it to automatically startup another instance each time i logged in.

As soon as the other instance of mysql associated with web matrix was stopped (and changed from automatic startup to manual) my problem with WAMP mysql was solved.

Koon answered 6/10, 2016 at 5:21 Comment(0)
I
0

I was running on the same problem, wampmysqld64 did not start, so I checked the Mysql log which you should find it inside the main wamp64 folder, and I found all the details on why is not working. on my computer I found another mysql instance is running so it prevents the wampmysqld64 to start. I stopped the other instance, and everything works fine after.

Infusionism answered 1/12, 2016 at 4:36 Comment(0)
V
0

I have solved my problem just by following below steps:

  • On windows platform press WINDOWS + R
  • Put services.msc and press OK
  • Stop already running MySQL and
  • Go to Wamp and start/resume MySQL service

All the best

Vassallo answered 23/8, 2017 at 6:18 Comment(0)
L
0

Click on wampserver icon then -> Apache -> httpd.conf -> search listen here you will find port number like this #Listen 12.34.56.78:80 Listen 80 change this port number with any other number like Listen 12.34.56.78:81 save this and now restart all servers it gets green to orange.

Liverish answered 23/6, 2018 at 7:26 Comment(0)
S
0

I had the same probelm for the past 3 days. Try this. It will definitely work. BEFORE proceeding with the installation of Wampserver, you must ensure that certain elements are installed on your system, otherwise Wampserver will absolutely not run, and in addition, the installation will be faulty and you will need to remove Wampserver BEFORE installing the elements that were missing. Uninstall wamp and download and Install 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), microsoft visual c++ redistributable 2015 (https://www.microsoft.com/en-in/download/details.aspx?id=48145). Now, reinstall wamp and it should work fine.

Supposition answered 12/1, 2019 at 6:39 Comment(0)
J
0

Wow.. This works for me. Unistall the wamp server Make sure this dependencies are successfully installed Microsoft Visual C++ Redistributable Packages vcredist_Allversions(x32 orx64) depending on your OS. Reinstall the wamp server and you are good to go. Thank you

Joellejoellen answered 20/12, 2019 at 8:52 Comment(0)
G
0

Basically this happens when you have not installed pre required software installed on your machine while installing Wampserver you might have got error bellow error at the time of installation.

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

program can't start because msvcr120.dll is missing

If you fixed those issue after the installation of wampserver then you might get stuck at this problem.

Then You can simply uninstall and install wamp server again

And If you have not install pre required dependency then first of all uninstall wampserver . And then install pre requirement first and then finally you can install Wampserver and it should work now.

you can download Pre-required applications from following link

For x64 Machines

microsoft visual c++ 2010 redistributable package (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 C++ Redistributable Packages for Visual Studio 2013 https://www.microsoft.com/en-in/download/details.aspx?id=40784

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

For x86 Machines

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 C++ Redistributable Packages for Visual Studio 2013 https://www.microsoft.com/en-in/download/details.aspx?id=40784

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

Note:- Take backup of your project files before uninstall

Gaia answered 17/10, 2020 at 7:21 Comment(0)
B
0

My problem was that wampmysqld64 service was disabled, so I went to: task manager > services > right click on wampmysqld64 and then properties, another window is gonna open, look for wampmysqld64 service then right click and then click on properties and a window is gonna pop up:

wampmysqld64 properties window

On "Startup type" just change it from disabled to automatic, then go back click on the service and run it and that's it wamp logo it's gonna turn green.

Biplane answered 28/10, 2020 at 19:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.