...
Code Block |
---|
vim /var/lib/postgresql/daselement-munich/postgres.conf # uncomment and change the line: listen_addresses = '*' >>> remove? # and change the port to 5433 to avoid conflicts with production any default instances that are running on port 5432 >>> remove? #portport = 5433 # start the Postgres server pg_ctl -D /var/lib/postgresql/daselement-data start |
create a user account
Code Block |
---|
# create user that is allowed to create new databases and read/write information
CREATE ROLE dbuser LOGIN password 'password';
ALTER USER dbuser CREATEDB; |
create a replication user
Code Block |
---|
# create replication user # postgres is the default postgres database psql --port 54325433 postgres [local]:54325433 postgres=# create user repuser replication; |
...
command | description |
---|---|
| list all databases |
| |
| list all users |
| lists available publications |
| lists available subscriptions |
| change user password |
Can not start Postgres Database
Code Block |
---|
FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5434.lock": Permission denied |
Solution is to fix the permissions on the folder. For example like this:
Code Block |
---|
sudo chmod a+w+r /var/lib/postgresql |
initdb: command not found
...