码迷,mamicode.com
首页 > 数据库 > 详细

PostgreSQL指定用户可访问的数据库pg_hba.conf

时间:2018-08-07 13:12:44      阅读:322      评论:0      收藏:0      [点我收藏+]

标签:bre   unity   pre   技术   目录   The   postgre   编辑   strong   

进入指定目录

# cd /var/lib/pgsql/9.3/data/

技术分享图片

使用vi编辑pg_hba.conf文件

# vi pg_hba.conf

技术分享图片

以上配置为所有IP及网关都允许访问,使用MD5认证。

postgres可访问所有数据库

bret用户仅允许访问community、community2数据库

weather仅允许访问weather数据库

PostgreSQL指定用户可访问的数据库pg_hba.conf

标签:bre   unity   pre   技术   目录   The   postgre   编辑   strong   

原文地址:https://www.cnblogs.com/bretgui/p/9431829.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!