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(https://cloud.baidu.com/solution/database.html所在服务器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 用户(角色);
相关推荐
tant1an7 分钟前
MySQL面试题(一)
数据库·mysql
喜欢的名字被抢了1 小时前
MongoDB生产实践:架构设计、分片集群与运维监控
数据库·mongodb·教程
红糖奶茶1 小时前
MySQL 8.0的自增主键持久化特性
数据库·mysql·adb
fen_fen1 小时前
Docker部署PostgreSQL10 开启SSL和证书安装文档
docker·容器·ssl
Macbethad1 小时前
基于TwinCAT的半导体刻蚀设备SCADA管理程序技术方案
运维·网络·数据库
ai_coder_ai2 小时前
编写自动化脚本,在自己后端服务中使用云原生Baas服务进行设备相关操作
数据库·云原生·自动化
oradh2 小时前
Oracle DG主备架构的基本维护操作总结
数据库·oracle·架构·dg主备架构的基本维护操作总结
xieliyu.2 小时前
MySQL 六大基础约束详解:NOT NULL/DEFAULT/UNIQUE/ 主键 / 外键 / CHECK
android·数据库·sql·mysql
JSON_L3 小时前
MongoDB文档关系详解
数据库·mongodb
卓怡学长3 小时前
w268基于springboot + vue 物流系统
java·数据库·vue.js·spring boot·spring·intellij-idea