PostgreSQL Server Configuration: Difference between revisions

From MK Wiki EN
Jump to navigation Jump to search
(Initial creation)
 
(+Create database and user)
Line 1: Line 1:
== Open SQL shell ==
sudo -u postgres psql
== Create database and user ==
create database '''dbname''';
create user '''user''' with encrypted password ''''password'''';
grant all privileges on database '''dbname''' to '''user''';
== Listen on all interfaces ==
== Listen on all interfaces ==



Revision as of 18:38, 26 April 2022

Open SQL shell

sudo -u postgres psql

Create database and user

create database dbname;
create user user with encrypted password 'password';
grant all privileges on database dbname to user;

Listen on all interfaces

In /etc/postgresql/version/main/postgresql.conf:

listen_addresses = '*'