Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 790
hmjha Avatar asked Sep 16 '18 08:09

hmjha


People also ask

How do I free up port 3306?

Steps to change port: Step 1: Open your xampp as administrator. Step 2: Click on 'Config' at the top right corner of your xampp. Step 3: Click on 'Service and Port Settings' and after that change the main port of mysql from 3306 to 3307 and the click on save.


2 Answers

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.

like image 178
hmjha Avatar answered Oct 01 '22 16:10

hmjha


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.

like image 32
Ali Avatar answered Oct 01 '22 16:10

Ali