How to resolve mysql port 3306 error on wamp?

和自甴很熟 提交于 2020-01-15 03:37:07

问题


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?


回答1:


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.




回答2:


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.




回答3:


Delete the my.ini file inside the folder work



来源:https://stackoverflow.com/questions/52352449/how-to-resolve-mysql-port-3306-error-on-wamp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!