错误:psql:致命:角色“user1”不存在 [英] Error: psql: FATAL: role "user1" does not exist

查看:284
本文介绍了错误:psql:致命:角色“user1”不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在使用Postgresql时遇到问题。我正在研究Linux操作系统,我创建了一个新用户。我有一个PSQL用户名和密码的数据库。我需要从我创建的用户那里访问这个数据库。



我尝试了什么:



添加.pgpass然后添加用户名传递用户...和chmod 600 .pgpass

错误:psql:致命:角色user1不存在。

有什么帮助吗?在此先感谢

Hello everyone,
I have a problem using Postgresql. I am working on linux OS and I create a new user. I have a database in PSQL username and password. I need to access this database from the user that I was created.

What I have tried:

add a .pgpass then add the username pass user... and chmod 600 .pgpass
The error: psql: FATAL: role "user1" does not exist.
Any help? Thanks in advance

推荐答案

您需要
createuser user1

作为数据库管理员,可能是用户postgres。你可能需要su root,然后su postgres来获得数据库管理器权限。如果用户需要创建或删除数据库对象,您可能还需要查看postgresql ROLES。

as the database manager, probably user postgres. You may need to su root, then su postgres to get database manger permissions. You'll probably also want to look into postgresql ROLES if the user needs to create or delete database objects.


这篇关于错误:psql:致命:角色“user1”不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆