XAMPP used port issues
If the port has been taken, you can follow the instruction below to scan the open ports:
- Type "cmd" in the Cortana search bar, then select "Run as administrator"
- Type the command "netstat -aon" and press "Enter"
- In the Local Address, you will see the port number (Ex: 0.0.0.0:135. The end digit is the port number )
- In the State column, you will see whether a specific port is opened. For open ports, it will say LISTENING
- To verify which app uses a particular port, find the PID for a particular port
- Open the "Task Manager"
- Go to the "Details" or "Services" tab to see all processes on your Windows 10 system. Sort them by the PID column to find the POD for the port you're trying to troubleshoot.
Once you find the open port number, you can follow below and change the port number to an open or unused port number.
- In the XAMPP GUI click on "Config" -> "Service and Port Settungs" -> "MySQL tab -> Change Main Port to 'YOUR PORT' -> Save -> Save
- Locate the installation file for XAMPP -> open MySQL folder -> open bin folder -> right click on "my.ini" and edit it
- Change the following lines: (Line 20) Port = "Old Port" -> Port = "New Port" (Line 28) Port = "Old Port" -> Port = "New Port"
- Save the file and restart your computer.