Login using default template1 database:
#psql -d template1
#template1=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+---------+----------+-------------+-------------+---------------------
postgres | gogasca | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | gogasca | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/gogasca +
| | | | | gogasca=CTc/gogasca
template1 | gogasca | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/gogasca +
| | | | | gogasca=CTc/gogasca
(3 rows)
Create a database with your userId:
template1=# CREATE DATABASE gogasca WITH OWNER gogasca ENCODING 'UTF8';
CREATE DATABASE
Quit and then login again
template1=# \q
gonzo:~ gogasca$ psql -h localhost
psql (9.4.0)
Type "help" for help.
gogasca=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+---------+----------+-------------+-------------+---------------------
gogasca | gogasca | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | gogasca | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | gogasca | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/gogasca +
| | | | | gogasca=CTc/gogasca
template1 | gogasca | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/gogasca +
| | | | | gogasca=CTc/gogasca
(4 rows)
Similar Posts:
- [How to Solve] psql: FATAL: role “postgres” does not exist
- [Solved] Postgres Error: template1 is being accessed by other users
- How to Solve Error: FATAL: role “root” does not exist
- [Solved] PSQL: fatal: the database system is starting up
- Postgres invalid command data recovery processing
- [Solved] createdb: could not connect to database postgres: FATAL: Peer authentication failed for user “postgres”
- [Solved] zabbix Monitor postgres Error: “sh:psql command not found”
- error: permission denied to create database [How to Solve]
- 029.PGSQL-pgsql Create New User Login Error: psql: FATAL: role “pguser” is not permitted to log in
- [Solved] MYSQL8.0 Error: the user specified as a definer (‘root’@’%’) does not exist