Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
每当我尝试运行“psql”时,都会收到以下错误消息:
ahcarpenter@ubuntu:~$ psql psql: FATAL: role "ahcarpenter" does not exist
有想法该怎么解决这个吗?
发生这种情况是因为
$ psql
相当于
$ psql ahcarpenter -U ahcarpenter
由于该用户不存在作为用户 postgres 输入
$ psql -U postgres
进入后创建用户和数据库“ahcarpenter”。
create user ahcarpenter; create database ahcarpenter with owner ahcarpenter;
出口
\q
重新进入