📜  postgrex.protocol 无法连接 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:36.858000             🧑  作者: Mango

代码示例1
This happened to me twice, after macOS crashed.
Most recently I used this:
Fix 1
Run postgres -D /usr/local/var/postgres
Copy the number after PID if you see something like this:
FATAL: lock file "postmaster.pid" already exists
HINT: Is another postmaster (PID 379) running in data directory "/usr/local/var/postgres"?
kill -9 PID with the process # in place of PID.
The steps that worked for me previously:
Fix 2
brew update
brew upgrade
brew postgresql-upgrade-database