PostgreSQL数据库服务端监听设置及客户端连接方法教程
众所周知,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数据库服务端监听设置及客户端连接方法教程的更多相关文章
- PostgreSQL服务端监听设置及client连接方法
背景介绍: PostgreSQL服务端执行在RedHat Linux上,IP为:192.168.230.128 client安装在Windows XP上, IP为:192.168.230.1 配置方法 ...
- Socket(TCP)客户端请求和服务端监听和链接基础(附例子)
一:基础知识回顾 一: Socket 类 实现 Berkeley 套接字接口. Socket(AddressFamily, SocketType,ProtocolType) 使用指定的地址族.套接字类 ...
- linux下oracle数据库服务和监听的启动停止
oracle数据库是重量级的,其管理非常复杂,将其在linux平台上的启动和关闭步骤整理一下. 安装完毕oracle以后,需要创建oracle系统用户,并在/home/oracle下面的.bash_p ...
- Html5 监听拦截Android返回键方法详解
浏览器窗口有一个history对象,用来保存浏览历史. 如果当前窗口先后访问了三个网址,那么history对象就包括三项,history.length属性等于3. history对象提供了一系列方法, ...
- 安卓开发学习日记 DAY5——监听事件onClick的实现方法
今天主要学习了监听事件的是实现方法,就是说,做了某些动作后,怎么监听这个动作并作出相应反应. 方法主要有三种: 1.匿名内部类的方法 2.独立类的方法 3.类似实现接口的方法 以下分别分析: 1.匿名 ...
- Android 关于ListView中按钮监听的优化问题(方法二)
关于ListView中按钮监听的优化问题(方法一)地址: http://www.cnblogs.com/steffen/p/3951901.html 之前的方法一,虽然能够解决position的传递, ...
- 设置MySQL客户端连接使用的字符集
设置MySQL客户端连接使用的字符集 时间:2014-03-05 来源:服务器之家 投稿:root 考虑什么是一个"连接":它是连接服务器时所作的事情.客户端发送SQL ...
- [redis]带密码的客户端连接方法
客户端连接方法: redis-cli -h localhost -p 6380 提供host为localhost,端口为6380 带密码的客户端连接方法一: redis-cli -h localh ...
- Flume笔记--source端监听目录,sink端上传到HDFS
官方文档参数解释:http://flume.apache.org/FlumeUserGuide.html#hdfs-sink 需要注意:文件格式,fileType=DataStream 默认为Sequ ...
随机推荐
- Windows通过DOS命令进入MYSQL的方法
例:MYSQL安装在 D:\ApacheServer\mysql 下 开始==>运行==>cmd,或者 按住win键+r键输入cmd C:\Users\Administrator>d ...
- 关于android中Bundle的使用
1.Android using Bundle for sharing variables 注:android中使用Bundle来共享变量,下例中Activity1和Activity2通过bundl ...
- drawer principle in Combinatorics
Problem 1: Given an array of real number with length (n2 + 1) A: a1, a2, ... , an2+1. Prove that th ...
- vi编辑文件E437: terminal capability "cm" required 解决办法
E437: terminal capability "cm" required 这个错误一般是环境变量TERM没有配置或者配置错误所致. 解决办法: 执行export TERM=x ...
- Linux下统计出现次数最多的指定字段值
假设桌面上有一个叫“data.txt”的文本,内容如下: {id='xxx' info='xxx' kk='xxx' target='111111' dd='xxx'}{id='xxx' info=' ...
- thinkphp 删除多条记录
删除id为123456的记录 $ids=array(1,2,3,4,5,6);$maps["id"] = array("in",$ids);$this-> ...
- sass的安装与基础
安装教程:http://www.haorooms.com/post/sass_css 手册:http://sass.bootcss.com/docs/guide/ http://www.w3c ...
- Educational Codeforces Round 1 A
In this problem you are to calculate the sum of all integers from 1 to n, but you should take all po ...
- Android开发之获取本地视频和获取自拍视频
1.获取本地所有视频 public void getLoadMedia() { Cursor cursor = UILApplication.instance.getApplicationContex ...
- form 提交
1.方式1:字段加验证 @model MvcWeb.Models.UserInfo @{ ViewBag.Title = "Add"; } <h2>Add</h2 ...