hmjha
hmjha

Reputation: 489

How to resolve mysql port 3306 error on wamp?

I am getting following error when I test mysql port 3306:

***** Test which uses port 3306 *****

===== Tested by command netstat filtered on port 3306 =====

Port 3306 is not found associated with TCP protocol
Port 3306 is not found associated with TCP protocol

--- Do you want to copy the results into Clipboard?
--- Type 'y' to confirm - Press ENTER to continue...

I've tried many methods but it could not work. Apache is working fine but MySQL service is not able to start. Wamp icon is orange and showing only 1 of 3 services running.

I have tried all points mentioned in MySQL service not starting on WAMP?

Upvotes: 5

Views: 26409

Answers (5)

Rushawn C Campbell
Rushawn C Campbell

Reputation: 1

going to C:\wamp64\bin\mysql*yourmysqlversion* you should find my.ini

After deleting that file you should be fine. Be sure to use your Wamp testing tools in wamp settings to test the ports for Mysql/Maria DB and Apache. Microsoft IIS is a common culprit for not making all services run.

Upvotes: 0

Ali
Ali

Reputation: 1795

after lots of struggling, I found the solution in this answer
for me, the reason for this issue was the wrong config data was cached for mysql so did this:

I tried going to: C:\wamp64\bin\mysql\mysql5.7.24\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.(dont delete that at all!) I then restarted wamp and it worked like a charm.

Upvotes: 3

Bill Brune
Bill Brune

Reputation: 1

Go to cmd and run 'netstat /a' to get a list of all the ports running.

Check to see if TCP 0.0.0.0:3006 is on the list. On mine, it was not and 0.0.0.0:3008 was on the list instead.

To verify the database is in fact running: Change directory to the folder holding the mysql version I expected to be running. Then I attempted to login with command line to the mysql database I instantiated with phpMyAdmin... using 'mysql -u yourloginId -p yourDataBaseName' Hit enter and then enter your pass word. If you did not setup a password... skip the '-p'.

If you database is running you'll get a bunch of info related to it and changes the prompt to 'mysql'.... type in 'quit' and hit enter to exit out. Then you are done with cmd.

Since the database is running and WAMP is using ports in the 3000 range, then I assumed that 3008 is the correct port. Go to the WAMP icon click on it... go to php then php.ini and edit it. Do a find on 3006... and you will likely find it as mysql port... change it to the port actually running mysql... for me it was 3008. Save it and restart WAMP... Issue should be resolved.

Upvotes: 0

Benjamin
Benjamin

Reputation: 11

Delete the my.ini file inside the folder work

Upvotes: 0

hmjha
hmjha

Reputation: 489

After so much exploring, it is rectified now. The my.ini file inside the Windows folder was the real problem. It is conflicting with the WAMP mysql my.ini. Now it is working fine after deleting that file from the Windows folder.

Upvotes: 3

Related Questions