This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
wmanager:setup_postgresql_db [2018/05/14 12:29] Gianluca Pelliccioli |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== TECH2018/ | ||
| - | |||
| - | === Create a specific user/pw === | ||
| - | |||
| - | < | ||
| - | postgres=# CREATE USER wmanager; | ||
| - | CREATE ROLE | ||
| - | postgres=# alter user wmanager WITH PASSWORD | ||
| - | ALTER ROLE | ||
| - | postgres=# | ||
| - | </ | ||
| - | |||
| - | === Create a new empty db === | ||
| - | < | ||
| - | [root@mon publics]# su - postgres | ||
| - | -bash-4.1$ psql | ||
| - | psql (8.4.20) | ||
| - | Type " | ||
| - | postgres=# create database demo_wmanager_org; | ||
| - | CREATE DATABASE | ||
| - | postgres=# | ||
| - | </ | ||
| - | |||
| - | === Assign database ownership === | ||
| - | < | ||
| - | postgres=# alter DATABASE demo_wmanager_org owner to wmanager; | ||
| - | ALTER DATABASE | ||
| - | </ | ||
| - | |||
| - | |||
| - | === Testing the connection === | ||
| - | < | ||
| - | -bash-4.1$ psql demo_wmanager_org -U wmanager -W | ||
| - | Password for user wmanager: | ||
| - | psql (8.4.20) | ||
| - | Type " | ||
| - | |||
| - | demo_wmanager_org=> | ||
| - | </ | ||
| - | |||
| - | === Note: DateTime/ | ||
| - | WManger uses your default postgres settings. | ||
| - | If you want to explicit setting to your database: | ||
| - | < | ||
| - | ALTER DATABASE demo_wmanager_org SET datestyle TO "SQL, DMY"; | ||
| - | </ | ||
| - | |||
| - | [[ wmanager: | ||