设置鉴权
-
创建新用户,演示的用户名 sac,密码 123
修改 PostgreSQL 数据库实例的客户端认证配置文件,配置文件在数据路径下,演示的路径是
/opt/sequoiasql/postgresql/database/5432/pg_hba.conf
...
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 0.0.0.0/0 trust
# IPv6 local connections:
配置内容修改后,表示使用 TCP 连接的需要携带 md5 算法加密的密码认证:
让 PostgreSQL 数据库实例重新加载配置,演示的实例名是 PostgreSQLInstance1。
/opt/sequoiasql/postgresql/bin/sdb_sql_ctl reload PostgreSQLInstance1
在 SAC 设置 PostgreSQL 数据库实例的鉴权,进入 部署 - 数据库实例 页面。
点击 PostgreSQL 数据库实例的 鉴权,输入 用户名 和 密码,点击 确定 按钮。
进入 数据 - 数据库实例 页面,访问 PostgreSQL 数据库实例的信息。