码迷,mamicode.com
首页 > 其他好文 > 详细

could not connect to server: Connection refused (0x0000274D/10061)

时间:2018-02-20 15:58:40      阅读:4456      评论:0      收藏:0      [点我收藏+]

标签:connect   div   border   lan   usr   href   art   style   2-2   

Oracle Linux 6.8 PostgreSQL Server IP: 192.168.10.220

Windows 7 x64 pgAdmin Custom Port IP: 192.168.10.2

 

Unable to connect to server:

 

could not connect to server: Connection refused (0x0000274D/10061)

Is the server running on host "192.168.10.220" and accepting

TCP/IP connections on port 5432?

 

技术分享图片

 

 Oracle Linux 6.8 Server IP: 192.168.10.220

 

[root@localhost usr]# find / -name postgresql.conf

/var/lib/pgsql/10/data/postgresql.conf

 

[root@localhost ~]# vi /var/lib/pgsql/10/data/postgresql.conf

listen_addresses = ‘*‘          # what IP address(es) to listen on;

                                        # comma-separated list of addresses;

                                        # defaults to ‘localhost‘; use ‘*‘ for all

                                        # (change requires restart)

port = 5432                             # (change requires restart)

 

[root@localhost ~]# vi /var/lib/pgsql/10/data/pg_hba.conf

# Add by QWR on 2018-02-20

# IPv4 local connections:

host    all             all             192.168.10.1/24         trust

 

[root@localhost ~]# netstat -a | grep PGSQ 

unix  2      [ ACC ]     STREAM     LISTENING     17881  /tmp/.s.PGSQL.5432

unix  2      [ ACC ]     STREAM     LISTENING     17880  /var/run/postgresql/.s.PGSQL.5432

 

[root@localhost ~]# reboot 

 

技术分享图片

could not connect to server: Connection refused (0x0000274D/10061)

标签:connect   div   border   lan   usr   href   art   style   2-2   

原文地址:https://www.cnblogs.com/quanweiru/p/8455261.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!