+2 votes
in Databases by (74.2k points)

I installed PostgreSQL 11 on my Ubuntu machine, but when I type psql on the terminal to access PostgreSQL, it gives the following error:

psql: FATAL:  role "xxxx" does not exist

What is the command to go to PostgreSQL terminal on Ubuntu?

1 Answer

+1 vote
by (71.8k points)
selected by
 
Best answer

Open the terminal and type the following commands to access PostgreSQL:

1. 

$ sudo -i -u postgres

2. It will change the current user to postgres. Then type psql to access PostgreSQL.

$ psql

Related questions

+2 votes
1 answer
+3 votes
1 answer
+2 votes
1 answer

...