Добавляем вверху
host all all 0.0.0.0/0 md5 host all all ::0/0 md5
Добавляем вверху
listen_addresses = '*'
systemctl restart postgresql
apt install libpq-dev python3-dev gcc pip install psycopg2
sudo -u postgres psql ... \q
ALTER USER postgres PASSWORD 'myPassword';
postgres=# create database mydb; postgres=# create user myuser with encrypted password 'mypass'; postgres=# grant all privileges on database mydb to myuser;
# pg_dropcluster 15 main --stop # pg_upgradecluster 13 main # pg_dropcluster 13 main # apt remove postgresql-13 postgresql-client-13