1、先查看进程pid ps -ef | grep 进程名 ps -ef | grep nginx 2、通过pid查看占用端口 netstat -nap | grep 端口/进程名 netstat -nap | grep 3306