Data studio普通用户采用非SSL的方式连接openGauss

Data studio 普通用户采用非 SSL 的方式连接 openGauss
关闭 SSL 认证
由于 openGauss 默认开启 SSL 认证,且配置认证较为麻烦,个人开发测试并不需要它。因此关闭 openGauss 的远程用户登录 SSL 认证模式。

1.找到 postgresql.conf。

cd /gaussdb/data/openGaussTest1/
2.修改 postgresql.conf 文件,关闭 SSL。

disabled
ssl = off # (change requires restart)

ssl_ciphers = 'ALL' # allowed SSL ciphers

3.修改 postgresql.conf 文件,增加要访问的端口号。

gs_guc reload -N feihu -I all -c "listen_addresses='localhost,x.x.x.x(数据库所在服务器IP)'"
4.修改 pg_hba.conf 文件,增加其他远程访问连接的许可。

gs_guc set -N all -I all -h "host all all .../0 sha256"
5.重启数据库。

设置普通用户权限
Data studio 在连接 openGauss 数据库时,会访问数据库的 pg_roles 系统表。系统用户是有权限访问 pg_roles,但普通用户不行。因此若想使普通用户通过 Data studio 访问数据库,需赋予该用户查询 pg_roles 的权限。例如:

grant select on pg_roles to 用户(角色);

posted @   openGaussbaby  阅读(71)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示