众所周知,PostgreSQL 是一个自由的对象-关系数据库服务器(数据库管理系统),是一个可以免费使用的开放源代码数据库系统。本文详细介绍了PostgreSQL数据库服务端监听设置及客户端连接方法,具体如下:

一、背景介绍:

本文所述PostgreSQL服务端运行在RedHat Linux上,IP为:192.168.230.128
客户端安装在Windows XP上, IP为:192.168.230.1

二、配置方法:

1.修改服务端/etc/postgresql/9.5/main/postgresql.conf文件,将:

1
#listen_address='localhost'

改成

1
listen_address='*'

2.修改/etc/postgresql/9.5/main/gp_hba.conf文件:

在其中增加客户端的ip,如下,注意最后一行:

1
2
3
4
5
6
7
8
9
10
11
12
# TYPE DATABASE  USER    CIDR-ADDRESS     METHOD
 
# "local" is for Unix domain socket connections only
local  all     all                trust
# IPv4 local connections:
host  all     all     127.0.0.1/32     trust
# IPv6 local connections:
host  all     all     ::1/128        trust
 
#kevin add
# IPv4 local connections:
host  all     all     192.168.230.1/32     trust

3.重启PG服务:

1
2
3
4
5
6
7
8
9
10
11
12
13
[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: database system is shut down
 done
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 to accept connections
 
[postgres@localhost data]$

4. 使用客户端连接,配置如下:

5.点击“确定”进行连接,成功后,如下:

PostgreSQL数据库服务端监听设置及客户端连接方法教程的更多相关文章

  1. PostgreSQL服务端监听设置及client连接方法

    背景介绍: PostgreSQL服务端执行在RedHat Linux上,IP为:192.168.230.128 client安装在Windows XP上, IP为:192.168.230.1 配置方法 ...

  2. Socket(TCP)客户端请求和服务端监听和链接基础(附例子)

    一:基础知识回顾 一: Socket 类 实现 Berkeley 套接字接口. Socket(AddressFamily, SocketType,ProtocolType) 使用指定的地址族.套接字类 ...

  3. linux下oracle数据库服务和监听的启动停止

    oracle数据库是重量级的,其管理非常复杂,将其在linux平台上的启动和关闭步骤整理一下. 安装完毕oracle以后,需要创建oracle系统用户,并在/home/oracle下面的.bash_p ...

  4. Html5 监听拦截Android返回键方法详解

    浏览器窗口有一个history对象,用来保存浏览历史. 如果当前窗口先后访问了三个网址,那么history对象就包括三项,history.length属性等于3. history对象提供了一系列方法, ...

  5. 安卓开发学习日记 DAY5——监听事件onClick的实现方法

    今天主要学习了监听事件的是实现方法,就是说,做了某些动作后,怎么监听这个动作并作出相应反应. 方法主要有三种: 1.匿名内部类的方法 2.独立类的方法 3.类似实现接口的方法 以下分别分析: 1.匿名 ...

  6. Android 关于ListView中按钮监听的优化问题(方法二)

    关于ListView中按钮监听的优化问题(方法一)地址: http://www.cnblogs.com/steffen/p/3951901.html 之前的方法一,虽然能够解决position的传递, ...

  7. 设置MySQL客户端连接使用的字符集

    设置MySQL客户端连接使用的字符集 时间:2014-03-05    来源:服务器之家    投稿:root 考虑什么是一个"连接":它是连接服务器时所作的事情.客户端发送SQL ...

  8. [redis]带密码的客户端连接方法

    客户端连接方法: redis-cli -h localhost -p 6380 提供host为localhost,端口为6380   带密码的客户端连接方法一: redis-cli -h localh ...

  9. Flume笔记--source端监听目录,sink端上传到HDFS

    官方文档参数解释:http://flume.apache.org/FlumeUserGuide.html#hdfs-sink 需要注意:文件格式,fileType=DataStream 默认为Sequ ...

随机推荐

  1. 骑士cms(74cms)个人版 整合UC

    1.安装74cms完成后登录总后台在菜单条工具选项中添加uc整合菜单. 在admin/templates/sys/admin_left_tools.htm这个文件中添加 <li >< ...

  2. OA系统如何使用考勤机数据

    通达OA系统使用考勤机数据目前有两种方法可以实现:一种是通过进行二次开发,将通达OA系统与考勤机结合起来使用:另一种是通过将考勤机的数据导出再导入OA系统中.进行二次开发的话,需要和定制开发工程师联系 ...

  3. miniUI 可编辑datagrid获取值的问题

    <div id="variableGrid" class="mini-datagrid" borderStyle="border-right:0 ...

  4. 【算法】简单动态规划——三逆数的O(N^2)解法!

    问题描述: 三逆数定义:给一个数的序列A[0,1,....N-1]),当i<j<k且A[i]>A[j]>A[k]时,称作ai,aj,ak为一个三逆数. 现在给定一个长度为N的数 ...

  5. 2016年11月11日 星期五 --出埃及记 Exodus 20:2

    2016年11月11日 星期五 --出埃及记 Exodus 20:2 "I am the LORD your God, who brought you out of Egypt, out o ...

  6. 2016年10月26日 星期三 --出埃及记 Exodus 19:10-11

    2016年10月26日 星期三 --出埃及记 Exodus 19:10-11 And the LORD said to Moses, "Go to the people and consec ...

  7. 2016年10月23日 星期日 --出埃及记 Exodus 19:7

    2016年10月23日 星期日 --出埃及记 Exodus 19:7 So Moses went back and summoned the elders of the people and set ...

  8. JS脚本语言里的循环

    js脚本语言:  循环:(循环操作某一个功能(执行某段代码)) 四要素: 循环初始值  循环条件  状态改变  循环体 for(穷举  迭代) while 举例:(穷举) 与7相关的数 <scr ...

  9. spark记录

    Filtering multiple values in multiple columns: In the case where you're pulling data from a database ...

  10. reactjs源码

    'use strict'; var EventConstants = _dereq_(15);var EventPropagators = _dereq_(19);var ExecutionEnvir ...