【发布时间】:2015-08-16 20:09:33
【问题描述】:
我使用的是 Linux Mint Cinnamon 2.2.16。
在启动和运行 Rails 的过程中,我遇到了 Postgres 的问题。
postgres@BL ~ $ psql --version
psql (Postgres-XC) 1.1
(based on PostgreSQL) 9.2.4
我无法使用我常用的用户名进行任何操作,因此我更改为默认用户使用
sudo su - postgres
我无法使用 createuser 进行任何操作。
postgres@BL ~ $ psql
psql: FATAL: role "postgres" does not exist
postgres@BL ~ $ createuser -s -U $USER
createuser: could not connect to database postgres: FATAL: role "postgres" does not exist
postgres@BL ~ $ sudo -u postgres createuser newname
Sorry, user postgres is not allowed to execute '/usr/bin/createuser newname' as postgres on BL.
postgres@BL ~ $ which psql
/usr/bin/psql
postgres@BL ~ $ psql \l
psql: FATAL: role "postgres" does not exist
【问题讨论】:
-
我没有得到 $ psql \l 的输出,而是给了我同样的致命错误:角色“postgres”不存在。让我觉得我根本没有用户,但需要用户创建用户...?
标签: postgresql psql