windows 查看端口占用和杀死进程

在windows命令行窗口下执行:
C:>netstat -aon|findstr "3306"

如上图,端口被进程号为5056的进程占用,继续执行下面命令:
C:>taskkill /f /t /im 5056

原文地址:https://www.cnblogs.com/irobotzz/p/12035804.html