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 用户(角色);
相关推荐
Databend18 小时前
在 AWS 中国峰会逛了一天,我在 Databend 展台看到了 Agent 数据基础设施的新思路
数据库·人工智能·agent
ClouGence2 天前
Oracle 数据同步为什么会出现数据不一致?长事务是常被忽略的原因
数据库·后端·oracle
飞将2 天前
从零实现数据库(2)——HashIndex + IndexManager
数据库
Nturmoils3 天前
订单列表慢查询,先看 WHERE、ORDER BY 和 LIMIT
数据库
渣波3 天前
拒绝 SQL 焦虑!手把手带你用 NestJS + Prisma + DTO 写出“防弹”级后端代码
javascript·数据库·后端
倔强的石头_4 天前
KingbaseES 新版MySQL 兼容版体验:旧版迁移 + 功能实测
数据库
倔强的石头_7 天前
《Kingbase护城河》——数据库存储空间全景探测与精细化瘦身实战
数据库
冬奇Lab8 天前
每日一个开源项目(第134篇):Zvec - 阿里开源的嵌入式向量数据库,向量搜索界的 SQLite
数据库·人工智能·llm
ClouGence8 天前
Oracle CDC 架构优化:从主库直连到 DataGuard 备库同步
数据库·后端·oracle
无响应de神8 天前
三、用户与权限管理
数据库·mysql