WAMP MySQL Service will not start

7

1

I did a fresh install of WAMP (v2.1) and it works excep the MySQL isn't starting.... here:

enter image description here

and everytime I press "Start/Resume Service", NOTHING happens.

I go to my.ini and put in a password.Then go to MySQL console.. type in that password and either 1. the console dissapeares or 2. I get Error 2003 "Can't connect to MySQL server on 'localhost' (10061)"

test

Posted 2011-08-11T04:46:57.807

Reputation: 400

1did you mistype here or in your config? should be "localhost" not "localhodst" – Endophage – 2011-08-11T04:49:26.470

whoops typo on my part. yeah it's localhost... but i did not mistype in the mysql thingy.... it is localhost... still same error – test – 2011-08-11T04:58:05.317

when i type netstat on cmd... i do not see port 3306 being used... even though it's allowed in my windows firewall.. i am using vista... 64-bit – test – 2011-08-11T04:59:42.010

What happens when you try to run mysqld directly? – Dan Grossman – 2011-08-11T05:34:37.970

How do I run mysqld? – test – 2011-08-11T06:08:24.493

Answers

3

Error No. 2003: Can't connect to MySQL server on 'localhost' (or some other host)

simply means that connection is not possible for one of the following (or similar) reasons:

  • There is no MySQL server running at the specified host

  • Connection to the MySQL server is not allowed using TCP-IP. Check the 'skip-networking' setting in the MySQL configuration file (my.ini on Windows, my.cnf on Unix/Linux). It shall be commented out like '#skip-networking'. If it is not commented out, then do it and restart the MySQL server for the change to take effect.

  • Some networking issue prevents connection. It could be a network malconfiguration or a firewall issue. You need to allow the service mysql on windows firewall/ after you install wamp, restart ur pc. and start wamp

windows will ask is msqlnt.exe allowed to run and accept it then its fine.

If it doesn't work then:

Try turning off the windows firewall - if that fixes the problem, then turn it back on, and allow access to TCP/3306(default port)

  • When trying to connect to a MySQL server at an ISP this error message often indicates that direct connection to MySQL has been blocked. You must then use HTTP-tunneling or SSH-tunneling to connect.

Ashwin A

Posted 2011-08-11T04:46:57.807

Reputation: 148

14

I tried going to: C:\wamp\bin\mysql\mysql5.6.17\data and deleted the following:

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

But I left the ibdata1 alone as it references all local databases. I then restarted wamp and it worked like a charm.

brettster

Posted 2011-08-11T04:46:57.807

Reputation: 141

this one worked for me ('17) – treyBake – 2017-07-25T08:36:19.013

Thank you a lot! You saved my evening! – Sharpey – 2020-02-05T19:25:48.813

3

Search for mysql-bin.index file, delete it, then restart MySQL.
This worked for me ;)

jzeus

Posted 2011-08-11T04:46:57.807

Reputation: 235

This worked wonderfully for me as well. Thanks! – Ardee Aram – 2015-01-19T10:13:25.127

2

Please check the port that MySQL is using on your system. Then, change the port number of the WAMP server's MySQL service to that number by entering it in my.ini.

If you're running Windows, make sure to restart service and it immediately turns green.

I ran into a similar problem.

Nikhil Goswami

Posted 2011-08-11T04:46:57.807

Reputation: 121

0

I had the exact same problem but my situation was different (I use WAMP 3.1 i.c.w. Windows 10 64-bit). Thus, the solution was different. Read below how I solved it in my situation.

First, I checked the MySQL Log. Like this:

Check the MySQL log

Second, I saw errors like this:

wampmysqld64: Table 'mysql.plugin' doesn't exist
2018-08-15T14:54:37.207560Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2018-08-15T14:54:37.211344Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-08-15T14:54:37.215551Z 0 [Warning] Failed to open optimizer cost constant tables

2018-08-15T14:54:37.216151Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

Third, after interpreting the errror log I navigated to the mysql data directory. The location of that directory on my machine was: C:\wamp64\bin\mysql\mysql5.7.19\data. This can be different on your machine. I noticed that some directories where missing. I didn't had a "mysql" directory, though it must be there in order to work.

Fourth, I copied the "mysql" directory from a different machine to C:\wamp64\bin\mysql\mysql5.7.19\data, and restarted All Services through WAMP. That solved the problem.

Julian

Posted 2011-08-11T04:46:57.807

Reputation: 111

0

This 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.

Mind_reader2003

Posted 2011-08-11T04:46:57.807

Reputation: 1

0

A previous mysql installation may cause this problem. Go to task manager and kill the mysqld.exe process. Then restart all the services. Good luck.

Onur Yıldırım

Posted 2011-08-11T04:46:57.807

Reputation: 1

The question was 7 years and 9 months old. Don't expect a feedback from the OP. – AndrewQ – 2019-05-18T21:53:38.823