PostgreSQL database server listener settings and Client connection method tutorial

Source: Internet
Author: User
Tags postgresql



As we all know, PostgreSQL is a free object-relational database server (database management system), is a free-to-use open source database system. In this paper, the PostgreSQL database server monitoring settings and client connection methods are described in detail as follows:



First, Background introduction:



The PostgreSQL server in this article is running on Redhat Linux with IP: 192.168.230.128
The client is installed on Windows XP and the IP is: 192.168.230.1



Second, the configuration method:



1. Modify the server-side/etc/postgresql/9.5/main/postgresql.conf file to:


#listen_address=‘localhost‘


Change into


listen_address=‘*‘


2. Modify the/etc/postgresql/9.5/main/gp_hba.conf file:



In which you increase the IP of the client, as follows, note the last line:



# TYPEDATABASEUSERCIDR-ADDRESS     METHOD#"local"isforUnix domain socket connectionsonlylocalallalltrust# IPv4localconnections:host allall127.0.0.1/32     trust# IPv6localconnections:host allall::1/128        trust#kevinadd# IPv4localconnections:host allall192.168.230.1/32     trust


3. Restart the PG service:



[[email protected] data]$ pg_ctl restartwaitingforservertoshut down....LOG: received smart shutdown requestLOG: autovacuum launcher shutting downLOG: shutting downLOG:databasesystemisshut down doneserver stoppedserver starting[[email protected] data]$ LOG:databasesystem was shut downat2011-07-09 14:54:29 CSTLOG: autovacuum launcher startedLOG:databasesystemisreadytoaccept connections[[email protected] data]$


4. Using a client connection, configure the following:






5. Click "OK" to connect, after successful, the following:






PostgreSQL database server listener settings and Client connection method tutorial


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.