Reputation: 65
I am trying to connect my MySQL database to XAMPP. Whenever I try to press start MySQL on XAMPP, it will not run and I get an error:
Port 3306 in use by "Unable to open process"!
MySQL WILL NOT start without the configured ports free!
You need to uninstall/disable/reconfigure the blocking application
or reconfigure MySQL and the Control Panel to listen on a different port
Could this be because of my virus protection software or VPN? How would I go about changing the ports in MySQL and Control Panel? If anyone could offer me some advice or direct me to an already answered question that is similar to this, it would be much appreciated. Thank you.
Upvotes: 2
Views: 4575
Reputation: 241
Now that you have done everything, you then have to click on Config and then->Service and Port Settings. Change Main Port to 8080 also. On your browser, remember to use localhost:8080 rather than just local host.
Upvotes: 0
Reputation: 2464
You will need to change the port or find the process that's using it to stop it from doing that.
Changing the port is the easiest solution.
You will need to specify in your future applications that the port is something else than 3306 because it will assume that it's 3306 by default and cause your application to not work.
You can do the following to find out which process is using the specified port:
Open a command prompt (with elevated priviliges (as admin)) and run the following command:
netstat -a -b
This will pump out a list of all the processes and the associated ports.
You can also put it into a textfile like so:
netstat -a -b > myFile.txt
Switching the port mysql uses:
As the error suggests, the port 3306 is being used by some other process on your system.
The easiest way to fix this will be by switching it to a different port.
You can do this by opening your XAMPP control panel and clicking on "Config" next to the mysql button. After that, click my.ini
.
After that, in the text file, edit the port to whatever you wanna use.
Upvotes: 2