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 用户(角色);
相关推荐
阿丰资源17 分钟前
基于SpringBoot+MySQL的社区团购系统设计与实现(附源码+文档+数据库,直接运行)
数据库·spring boot·mysql
2301_803875611 小时前
Python怎么计算NumPy数组的切比雪夫距离_使用abs与max求解
jvm·数据库·python
还是阿落呀1 小时前
第二章 数据类型、表的约束
数据库·mysql
希望永不加班1 小时前
SpringBoot 数据库索引优化:慢查询分析
java·数据库·spring boot·后端·spring
WL_Aurora1 小时前
MySQL 插入中文报错 ERROR 1366 (HY000): Incorrect string value 的解决办法
数据库·mysql
qq_349317481 小时前
CSS如何实现Bootstrap进度条自定义动画_利用keyframe关键帧
jvm·数据库·python
2401_871492851 小时前
Python机器学习怎么防止数据泄漏_确保Scaler在Pipeline内拟合
jvm·数据库·python
【心态好不摆烂】1 小时前
数据库基础
数据库
Bert.Cai1 小时前
MySQL UPPER()函数详解
数据库·mysql
2301_818008441 小时前
MySQL怎样在触发器中引用新旧数据行_NEW与OLD关键字详解
jvm·数据库·python