XAMPP used port issues

If the port has been taken, you can follow the instruction below to scan the open ports:

  1. Type "cmd" in the Cortana search bar, then select "Run as administrator"
  2. Type the command "netstat -aon" and press "Enter"
  3. In the Local Address, you will see the port number (Ex: The end digit is the port number )
  4. In the State column, you will see whether a specific port is opened. For open ports, it will say LISTENING
  5. To verify which app uses a particular port, find the PID for a particular port
  6. Open the "Task Manager"
  7. 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.

  1. In the XAMPP GUI click on "Config" -> "Service and Port Settungs" -> "MySQL tab -> Change Main Port to 'YOUR PORT' -> Save -> Save
  2. Locate the installation file for XAMPP -> open MySQL folder -> open bin folder -> right click on "my.ini" and edit it
  3. Change the following lines: (Line 20) Port = "Old Port" -> Port = "New Port" (Line 28) Port = "Old Port" -> Port = "New Port"
  4. Save the file and restart your computer.