Windows下查看某个端口被哪个服务占用

1.查看某个端口是否被占用

打开命令行,输入:netstat -ano | findstr “3306”

2.查看端口被哪个服务占用

tasklist | findstr “PID”

如下图: