Postgresql: Difference between revisions

From Objectif Client Inc
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=== Postgresql ===
==== Authorize external connection ====
** Modify /etc/postgresql/12/main/postgresql.conf
<pre>listen_addresses = '*'</pre>
** Modify /etc/postgresql/12/main/pg_hba.conf
<pre>host all all 0.0.0.0/0 md5</pre>
==== Change postgres password ====
<pre>sudo -u postgres psql</pre>
then
<pre>\password postgres</pre>
=== PgAdmin4===
=== PgAdmin4===



Revision as of 21:16, 8 August 2020

Postgresql

Authorize external connection

    • Modify /etc/postgresql/12/main/postgresql.conf
listen_addresses = '*'
    • Modify /etc/postgresql/12/main/pg_hba.conf
host all all 0.0.0.0/0 md5

Change postgres password

sudo -u postgres psql

then

\password postgres

PgAdmin4

Url

http://localhost/pgadmin4

Reset Web Password

  • Clear /var/lib/pgamdin folder
  • Reconfigure the web interface
 dpkg-reconfigure pgamin4-apache