免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3897 | 回复: 4

pgAdmin III 连接postgresql出错 [复制链接]

论坛徽章:
0
发表于 2012-03-15 10:15 |显示全部楼层
pgAdmin III连接postgresql报错:
Access to database denied

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

To access a database on a PostgreSQL server, you first have to grant primary access to the server for your client (Host Based Authentication). PostgreSQL will check the pg_hba.conf file if a pattern that matches your client address / username / database is present and enabled before any SQL GRANT access control lists are evaluated.
The initial settings in pg_hba.conf are quite restrictive, in order to avoid unwanted security holes caused by unreviewed but mandatory system settings. You'll probably want to add something like

host all all 192.168.0.0/24 md5
This example grants MD5 encrypted password access to all databases to all users on the private network 192.168.0.0/24.
You can use the pg_hba.conf editor that is built into pgAdmin III to edit the pg_hba.conf configuration file. After changing pg_hba.conf, you need to trigger a server configuration reload using pg_ctl or by stopping and restarting the server process.
请各位兄弟帮忙看看是什么原因,在下不胜感激

论坛徽章:
0
发表于 2012-03-15 10:18 |显示全部楼层
本来是可以连接的,好像是服务器非正常关机后,就不能连接了。

论坛徽章:
0
发表于 2012-03-21 17:53 |显示全部楼层
把pg_hba.conf的内容贴下

论坛徽章:
0
发表于 2012-03-21 22:42 |显示全部楼层
从报错信息来看应该是pg_hba.conf的问题,把文件内容贴出来才好进一步分析。

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
发表于 2012-03-22 11:09 |显示全部楼层
一要看pg_hba.conf的内容。
二要看启动方式,postmaster -i。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP