由于我正在测试sql脚本,所以我首先删除实例和用户:
REVOKE CONNECT ON DATABASE online_dev FROM dbIdsManager;
DROP USER dbIdsManager;
然后我创建了数据库online_dev和表。 在此之后,我创建了这样的用户:
CREATE USER dbIdsManager WITH PASSWORD 'abc123' VALID UNTIL 'infinity';
ALTER ROLE dbIdsManager IN DATABASE online_dev SET search_path TO map_id_db;
GRANT CONNECT ON DATABASE online_dev TO dbIdsManager;
GRANT USAGE ON SCHEMA map_id_db TO dbIdsManager;
GRANT SELECT ON ALL TABLES IN SCHEMA map_id_db TO dbIdsManager;
每当我尝试使用该用户登录时,它都会说密码不正确。
FATAL: password authentication failed for user "dbIdsManager"
FATAL: password authentication failed for user "dbIdsManager"
Please enter the password for the user 'dbIdsManager' to connect the server - "dbtest"
有些帖子可能是错误的,有效的直到'但我已经添加了' infinity'验证
关于它可能是什么问题的任何想法?
服务器是aws rdbms的一个实例。
答案 0 :(得分:1)
权限设置不正确。
我的解决方案正在关注,
CREATE USER dbIdsManager WITH PASSWORD 'abc123' VALID UNTIL 'infinity' LOGIN;
如果未指定LOGIN
或NOLOGIN
,则NOLOGIN
为默认值。