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?
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