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 用户(角色);
相关推荐
薛定谔的算法5 小时前
phoneGPT:构建专业领域的检索增强型智能问答系统
前端·数据库·后端
Databend7 小时前
Databend 亮相 RustChinaConf 2025,分享基于 Rust 构建商业化数仓平台的探索
数据库
得物技术8 小时前
破解gh-ost变更导致MySQL表膨胀之谜|得物技术
数据库·后端·mysql
Raymond运维12 小时前
MariaDB源码编译安装(二)
运维·数据库·mariadb
沢田纲吉12 小时前
🗄️ MySQL 表操作全面指南
数据库·后端·mysql
RestCloud1 天前
SQL Server到Hive:批处理ETL性能提升30%的实战经验
数据库·api
RestCloud1 天前
为什么说零代码 ETL 是未来趋势?
数据库·api
ClouGence1 天前
CloudCanal + Paimon + SelectDB 从 0 到 1 构建实时湖仓
数据库
DemonAvenger2 天前
NoSQL与MySQL混合架构设计:从入门到实战的最佳实践
数据库·mysql·性能优化
AAA修煤气灶刘哥2 天前
后端人速藏!数据库PD建模避坑指南
数据库·后端·mysql