Project

General

Profile

Actions

PostgreSQL

little setup from netbox

root@netbox:~# sudo -u postgres psql
psql (17.10 (Debian 17.10-0+deb13u1))
Type "help" for help.

postgres=# create database netbox;
CREATE DATABASE
postgres=# create user doops with password 'cocolided' ;
CREATE ROLE
postgres=# alter database netbox owner to netbox;
ERROR:  role "netbox" does not exist
postgres=# alter database netbox owner to doops;
ALTER DATABASE
postgres=# \connect netbox
You are now connected to database "netbox" as user "postgres".
netbox=# grant create on schema public to doops;
GRANT
netbox=# \l
                                                     List of databases
   Name    |  Owner   | Encoding | Locale Provider |   Collate   |    Ctype    | Locale | ICU Rules |   Access privileges   
-----------+----------+----------+-----------------+-------------+-------------+--------+-----------+-----------------------
 netbox    | doops    | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |        |           | 
 postgres  | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |        |           | 
 template0 | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |        |           | =c/postgres          +
           |          |          |                 |             |             |        |           | postgres=CTc/postgres
 template1 | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |        |           | =c/postgres          +
           |          |          |                 |             |             |        |           | postgres=CTc/postgres
(4 rows)

Updated by Willy Manga about 1 month ago ยท 1 revisions