pgAdmin3连接问题 [英] pgAdmin3 connection problems

查看:3089
本文介绍了pgAdmin3连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近正在使用VMware Workstation 8设置和运行Windows 2008 r2服务器。

I'm recently setting up and running a Windows 2008 r2 server with VMware Workstation 8.

我使用Postgresql 9.1运行Centos 6.2虚拟linux框。一切似乎确定在本地,我可以通过桥接网络连接到CentOS框。

I'm running a Centos 6.2 virtual linux box with Postgresql 9.1. Everything seems ok locally and I can connect to the CentOS box via a bridged network connection.

我跟着 David Ghedini的演练中设置Postgresql 9.1。所以我能够启动一个putty会话窗口,以root用户身份登录并启动psql shell并作为postgres用户发出语句。我的问题是,我不能使用pgAdmin III从我的Windows 7客户端连接。我已更新 /var/lib/pgsql/9.1/data/postgresql.conf 以启用listen_addresses'*'等。

I have followed David Ghedini's walkthrough for setting up Postgresql 9.1. So I am able to start a putty session window, log in as root and start psql shell and issue statements as postgres user. My problem is that I cannot connect using pgAdmin III from my Windows 7 client. I have updated the /var/lib/pgsql/9.1/data/postgresql.conf to enable listen_addresses '*', etc.

任何人都可以给我任何提示,找到我的错。

Could anyone give me any tips on finding my fault. Have ensured Windows Firewall is disabled on the Windows server, too.

pgAdmin III客户端报告;

The pgAdmin III client reports;


服务器不监听

'Server doesn't listen'

服务器不接受连接:连接库报告



The server doesn't accept connections: the connection library reports


无法连接到服务器:连接超时(0x0000274C / 10060)服务器在主机192.168.1.26上运行并接受TCP / IP在端口5432上的连接?

could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "192.168.1.26" and accepting TCP/IP connections on port 5432?

这是添加的 pg_hba.conf

#TYPE DATABASE   USER   ADDRESS          METHOD
host  all        all    192.168.1.0/24   trust

添加iptables文件条目:

And the iptables file entries added:

-A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 192.168.1.26 --dport 5432 -m state --state NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp -s 192.168.1.26 --sport 5432 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT


推荐答案

您需要调整 pg_hba.conf

http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html

一旦你添加了自己的主机和相应的用户,重新启动postgresql服务器,希望你可以连接。

Once you add your own host and corresponding user, restart postgresql server so hopefully you can connect.

此外,你可能需要启用它的网络端口:
http://www.cyberciti.biz/tips/postgres -allow-remote-access-tcp-connection.html

Also you might need to enable it's port on the network: http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html

这篇关于pgAdmin3连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆