open the "httpd.conf" file
replace
Listen 80
ServerName localhost:80
Listen your port
ServerName localhost:your port
open the "httpd.conf" file, This file should be found in C:xamppapacheconf on Windows or in bin/apache in xampp directory for Linux
and replace following lines :
Listen 80
ServerName localhost:80
if you want to use port 5000
Listen 5000
ServerName localhost:5000
1. Open xampp control panel.
2. Press Config on MySQL line.
3. Open my.ini
4. Search for the variable "port" under "The MySQL server.
5. Change the port to your desired value.
6. Start MySQL to make sure it has successfully changed.
Edit "[path-to-xampp-folder]/mysql/bin/my.ini", change 3306 to whatever port you want to use.
Edit /bin/apache/httpd.conf
Listen YourPort
ServerName localhost:YourPort