User Tools

Site Tools


wmanager:install_setup_postgresql_db

Postgres Database creation

Create a specific user/pw

postgres=# CREATE USER wmanager;
CREATE ROLE
postgres=# alter user wmanager WITH PASSWORD  'xxxx';
ALTER ROLE
postgres=# 

Create a new empty db

[root@mon publics]# su - postgres
-bash-4.1$ psql 
psql (8.4.20)
Type "help" for help.
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 "help" for help.

demo_wmanager_org=> 

Note: DateTime/currency/chartset settings

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/install_setup_postgresql_db.txt · Last modified: 2017/12/20 09:32 by pgian