首页 > 解决方案 > ubuntu 和 centos 中的 Postgres 连接错误

问题描述

我是postgres的新手。通过 ubuntu 和 centos 连接时出现此错误:

psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

标签: postgresqlubuntucentos7

解决方案


通过编辑 pg_hba.conf 文件中的 ipv4 条目授予所有主机权限。修改后重启postgresql服务。


推荐阅读