+2 votes
in Databases by (19.3k 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 (17.0k points)

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


$ sudo -i -u postgres

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

$ psql

Related questions