How to check the port (3306) occupied by that program

When I start the application, I find that the required port is already occupied and the startup fails. How can I check which application is occupying the port? You can use netstat to view under the command symbol:

netstat -a -n displays the occupation of each port
netstat -ano displays the occupation of each port and process PID

Start-run-cmd to confirm or press Enter to enter the command prompt window, type netstat -ano to see all connected port occupancy and PID, and then find the program corresponding to this PID in the task manager. There is no PID in this item, you can select "View"-"Select Column"-"PID" in the task manager and tick it.

You can also use the following methods to determine which program is occupying the port:

Enter the command prompt and type netstat -aon|findstr "3306" (for example, I want to check if port 3306 is occupied by that application)

C:Documents and SettingsAdministrator>netstat -aon|findstr “3306”
TCP 0.0.0.0:3306 0.0.0.0:0 LISTENING 2000

C:Documents and SettingsAdministrator>tasklist|findstr “2000”
mysqld-nt.exe 252 Console 0 17,820 K

It can be seen that mysqld-nt.exe occupies port 3306.

================================================================================

I have installed APMServ

Open the task manager, find the mysqld-nt.exe process, and kill it directly...

Original link: https://blog.csdn.net/hxbunulidehaizhi/article/details/50500645

Guess you like

Origin blog.csdn.net/qq_41962258/article/details/113071682