PostgreSQL database server-side listening settings and Client connection methods Tutorial _ Database Other

Source: Internet
Author: User
Tags postgresql unix domain socket

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

First, Background introduction:

The PostgreSQL server in this article runs on Redhat linux, IP: 192.168.230.128
The client is installed on Windows XP, IP is: 192.168.230.1

Second, the configuration method:

1. Modify the service-side/opt/postgresql/data/postgresql.conf file to:

#listen_address = ' localhost '

Change into

Listen_address= ' * '

2. Modify the/opt/postgresql/data/gp_hba.conf file:

In which the IP of the client is increased, as follows, note the last line:

# TYPE DATABASE  USER    cidr-address     Method

# ' local ' to Unix domain socket connections only
local< C6/>all all Trust
# IPv4 Local connections:
host all All     127.0.0.1/32     Trust
# IPV6 Local connections: "
host All": 1/128 trust

#kevin add
# IPV4 Local connections:
host all All     192.168.230.1/32     Trust

3. Restart PG Service:

[Postgres@localhost data]$ pg_ctl Restart
waiting for server to shut down .... Log:received Smart shutdown request
log:autovacuum launcher shutting down
log:shutting down
Log:databa SE system is shut down
 do
server stopped
server starting
[Postgres@localhost data]$ log:database System was shut down at 2011-07-09 14:54:29 CST
log:autovacuum launcher started Log:database
system is ready t o Accept Connections

[Postgres@localhost data]$

4. Using client connections, configure the following:

5. Click "OK" to connect, after success, as follows:

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.