Solving Error "psql: FATAL: database "root" does not exist"
Swith ke PostgreSQL user
root@odoo-skm:/efs/Odoo/server/odoo_v14# su - postgres
Cek koneksi
postgres@odoo-skm:~$ psql
Buat Role
postgres@odoo-skm:~$ psql
psql (10.15 (Ubuntu 10.15-0ubuntu0.18.04.1))
Type "help" for help.
postgres=# /du
postgres-# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
odoo13 | Create DB | {}
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
postgres-# CREATE ROLE odoo14 WITH LOGIN PASSWORD 'Getting Started';
ERROR: syntax error at or near "/"
LINE 1: /du
^
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
odoo13 | Create DB | {}
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
postgres=# CREATE ROLE odoo14 WITH LOGIN PASSWORD 'Getting Started';
CREATE ROLE
postgres=# ALTER ROLE odoo14 CREATEDB;
ALTER ROLE