📌  相关文章
📜  无法连接到服务器:连接被拒绝服务器是否在主机“localhost”(::1)上运行并接受端口 5432 上的 TCP IP 连接 - Shell-Bash 代码示例

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

代码示例2
// In my case PostgreSQL updates from version 13.4 to 14 in background, so it fixes by:
    brew postgresql-upgrade-database
// In other case the problem fixed by:
    rm -rf /usr/local/var/postgres/postmaster.pid
// Restart service postgresql:
    brew services restart postgresql
// How can you understand what is the problem?
// For first see what service is not correct started:
    brew services list
// For second show file postgres.log, where will be the error:
    tail -f /usr/local/var/log/postgres.log
// And so find answer by this error's text