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 用户(角色);
相关推荐
BU摆烂会噶13 分钟前
【LangGraph】持久化实现的三大能力——时间旅行
数据库·人工智能·python·postgresql·langchain
l1t1 小时前
DeepSeek总结的DuckLake 入门
数据库
Joseph Cooper1 小时前
RAG 与 AI Agent:智能体真的需要检索增强生成吗?
数据库·人工智能·ai·agent·rag·上下文工程
light blue bird1 小时前
主子端台二分法任务汇总组件
前端·数据库·.net·桌面端winform
DevilSeagull2 小时前
MySQL(2) 客户端工具和建库
开发语言·数据库·后端·mysql·服务
小李来了!2 小时前
Navicate/plsql连接Oracle数据库教程
数据库·oracle
苍煜2 小时前
慢SQL优化实战教学
java·数据库·sql
zhaoyong2223 小时前
MySQL 存储过程中字符集与排序规则不匹配导致查询性能下降的解决方案
jvm·数据库·python
sinat_383437363 小时前
golang如何从Python转型Go开发_golang从Python转型Go开发攻略
jvm·数据库·python
远洪3 小时前
claude code 国内安装使用
数据库·mysql