博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PostgreSQL服务端监听设置及client连接方法
阅读量:6994 次
发布时间:2019-06-27

本文共 1200 字,大约阅读时间需要 4 分钟。

背景介绍:

  PostgreSQL服务端执行在RedHat Linux上,IP为:192.168.230.128

  client安装在Windows XP上, IP为:192.168.230.1

配置方法:

 1.  改动服务端/opt/postgresql/data/postgresql.conf文件,将

#listen_address='localhost'改成listen_address='*'

 2. 改动/opt/postgresql/data/gp_hba.conf文件

在当中添加client的ip,例如以下,注意最后一行:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD# "local" is for Unix domain socket connections onlylocal   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服务

[postgres@localhost data]$ pg_ctl restartwaiting for server to shut down....LOG:  received smart shutdown requestLOG:  autovacuum launcher shutting downLOG:  shutting downLOG:  database system is shut down doneserver stoppedserver starting[postgres@localhost data]$ LOG:  database system was shut down at 2011-07-09 14:54:29 CSTLOG:  autovacuum launcher startedLOG:  database system is ready to accept connections[postgres@localhost data]$

4. 使用client连接,配置例如以下:

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

转载地址:http://teivl.baihongyu.com/

你可能感兴趣的文章
强大的数据库访问类dbhelper 2.0 转
查看>>
[Ubuntu] how to use url-rewrite in apache2
查看>>
市场购物篮分析(规则归纳/C5.0)+apriori
查看>>
RMQ 学习笔记
查看>>
Oracle 修改dmp的表空间
查看>>
从0到上线开发企业级电商项目_前端_01_sublime使用技巧
查看>>
Android 百分比布局库(percent-support-lib)
查看>>
1、MLflow:一个开源的机器学习平台
查看>>
MySQL必知必会
查看>>
Linux的企业-监控Cacti
查看>>
极速理解设计模式系列:15.中介者模式(Mediator Pattern)
查看>>
SQL Server-聚焦过滤索引提高查询性能(十)
查看>>
树莓派:最好的安排
查看>>
我看好互联网阅读(r11笔记第63天)
查看>>
关于奇怪的并行进程分析(三)
查看>>
和开发讨论的一个数据变更需求
查看>>
[20150604]关于同义词的问题3.txt
查看>>
Java实现视频网站的视频上传、视频转码、视频关键帧抽图, 及视频播放功能
查看>>
VMware 虚拟化编程(11) — VMware 虚拟机的全量备份与增量备份方案
查看>>
PostgreSQL 自定义自动类型转换(CAST)
查看>>