+1 vote
in Databases by (6.4k 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

0 votes
by (10.2k points)

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

...