How to Kill the Process Currently Using a Port
In XAMPP, I got the error “Error establishing a database connection.” This happened because the port was assigned to another application, right? How do I kill the process on the port?
Open cmd and Execute this command to find the process that using the port,
netstat -ano | findstr :<PORT> example: netstat -ano | findstr :3306
you will see output like this,
in right corner you will see the process pid value. now you can run this command to kill the process,
taskkill /PID <PID> /F example taskkill /PID 6912 /F
Note: Run these Command as an administrator