The server doesn't grant access to the database: the server reports 
FATAL: no pg_hba.conf entry for host "192.168.0.123", user "postgres", database "postgres" FATAL: no pg_hba.conf entry for host "192.168.0.123", user "postgres", database "postgres"

PostgreSQL数据库为了安全,它不会监听除本地以外的所有连接请求,当用户通过JDBC访问是,会报一些如下的异常:

org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host

要解决这个问题,只需要在PostgreSQL数据库的安装目录下找到/data/pg_hba.conf,找到“# IPv4 local connections:”

在其下加上请求连接的机器IP

host all all 127.0.0.1/32 md5

32是子网掩码的网段;md5是密码验证方法,可以改为trust

PostgreSQL 连接问题 FATAL: no pg_hba.conf entry for host的更多相关文章

  1. PostgreSQ 连接问题 FATAL: no pg_hba.conf entry for host

    PostgreSQ数据库为了安全,它不会监听除本地以外的所有连接请求,当用户通过JDBC访问是,会报一些如下的异常: org.postgresql.util.PSQLException: FATAL: ...

  2. PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "ambari", database "ambari", SSL off

    On your Postgres server, you will need to update your pg_hba.conf file to allow access for the ambar ...

  3. Azure安装完postgresql遇到:psql: error: could not connect to server: FATAL: no pg_hba.conf entry for host

    进入创建好的Azure Database for PostgreSQL server 点击connection security 在Firewall rules中  Add 0.0.0.0-255.2 ...

  4. navicat 连接postgresql报错pg_hba.conf

    PostgreSQ数据库为了安全,它不会监听除本地以外的所有连接请求,当用户通过JDBC访问是,会报一些如下的异常: org.postgresql.util.PSQLException: FATAL: ...

  5. PostgreSQL pg_hba.conf 文件简析

    作者:高张远瞩(HiLoveS) 博客:http://www.cnblogs.com/hiloves/ 转载请保留该信息 最近试用PostgreSQL 9.04,将pg_hba.conf配置的一些心得 ...

  6. 从pg_hba.conf文件谈谈postgresql的连接认证

    最近一直在弄postgresql的东西,搭建postgresql数据库集群环境什么的.操作数据库少不得要从远程主机访问数据库环境,例如数据库管理员的远程管理数据库,远程的客户存取数据库文件. 而在po ...

  7. PostgreSQL远程连接,发生致命错误:没有用于主机“…”,用户“…”,数据库“…”,SSL关闭的pg_hba.conf记录

    PostgreSQL远程连接方法 有时候在远程连接时,会报Error connecting to the server:致命错误:没有用于主机“…”,用户“…”,数据库“…”,SSL关闭的pg_hba ...

  8. postgreSQL远程连接出现:Error connecting to server :致命错误 SSL关闭的pg_hba.conf记录

    异常截图:

  9. PostgreSQL的pg_hba.conf文件讲解

    pg_hba.conf为PostgreSQL的访问策略配置文件,默认位于/var/lib/pgsql/10/data/目录(PostgreSQL10). 该配置文件有5个参数,分别为:TYPE(主机类 ...

随机推荐

  1. angular环境搭建时的坑

    安装angular环境踩过一些坑,最终还是把工程跑起来了,这里描述一下我的步骤,不排除有些步骤是多余的,希望能对遇到同样问题的小伙伴有帮助. 下载最新版node.js. 安装node,安装过程一路点下 ...

  2. MySQL---3、常用命令大全

    一.连接MySQL 格式: mysql -h主机地址 -u用户名 -p用户密码 1.例1:连接到本机上的MYSQL. 首先在打开DOS窗口,然后进入目录 mysqlbin,再键入命令mysql -ur ...

  3. Java - 使可访问性最小化

    模块设计是否良好,有个重要的因素在于,相对外部模块是否隐藏内部数据以及实现细节. 设计良好的模块会隐藏实现细节,并将API与其实现隔离开来. 模块之间通过API进行通信,对于内部工作情况互不可见. 即 ...

  4. windbg .net 程序的死锁检测 常用方法(个人备份笔记)

    //死锁检测 .load sosex.dll :> !dlk :> !mk -a The mk command displays a call stack of the currently ...

  5. UVA 455(最小周期)

    最小周期可以用%枚举 #include <iostream> #include <string> #include <cstring> #include <c ...

  6. HTML颜色的三种写法

    颜色的三种写法: 1.16进制代码     #000000 2.英文字母         red 3.rgba                rgba(0-255,0,0,0-1) 例如: <b ...

  7. csharp:datagridview enter Half Width and Full Width characters

    /// <summary> /// 全角 /// </summary> /// <param name="unicodeString">< ...

  8. FATAL bad indentation of a mapping entry at line 83, column 3: branch: master 已解决;

    部署hexo 时候,修改完_config.yml  文件后更新报错如下,问题解决: FATAL bad indentation of a mapping entry at line 83, colum ...

  9. PoPo数据可视化周刊第4期

    PoPo数据可视化 聚焦于Web数据可视化与可视化交互领域,发现可视化领域有意思的内容.不想错过可视化领域的精彩内容, 就快快关注我们吧 :) 微信号:popodv_com   由于国庆节的原因,累计 ...

  10. BZOJ4671:异或图

    传送门 直接求连通的不好做,考虑容斥 设 \(g_i\) 表示至少有 \(i\) 个连通块的方案数,\(f_i\) 表示恰好有 \(i\) 个的 那么 \[g_x=\sum_{i=x}^{n}\beg ...