【发布时间】:2021-02-07 11:26:39
【问题描述】:
我将重新安装postgresql,因为我无法再登录(密码丢失)。但是,每次我试图杀死相应端口(@987654322@)上的进程时,PID 都会发生变化,并且端口仍然没有被释放。我很沮丧,这需要 2 周多的时间。
这是我正在做的事情:
#find the PID on 5432
sudo lsof -i: 5432 # this gives me a line where I can identify the process ID
sudo kill -9 <PID> # I use the PID given by the previous function
最后一个命令提示我是否希望postgres 接受传入的网络连接。无论我选择哪个选项(拒绝或允许)都会导致同样的事情。当我尝试启动postgres 时仍然告诉我端口5432 很忙,而且确实很忙。当我重新使用上面的第一个命令时,我注意到 postgres 仍然存在并且 PID 已更改。
【问题讨论】:
标签: postgresql macos command-line