2 hours ago · Tech · hide · 0 comments

Collecting notes on databases management, mainly Postgres. Change password It could be that connecting from localhost does not require a password. In that case, you have to replace trust with scram-sha-256 in /var/lib/postgresql/data/pg_hba.conf and either restart the service or run SELECT pg_reload_conf(); to apply the changes. ALTER USER username WITH PASSWORD 'newpasswordhereeeeee' Run inside a container podman exec -it containername psql -d "postgresql://username@localhost/maybesomething" -c "COMMAND" or podman exec -it spliit-db bash -lc ' psql \ "host=127.0.0.1 port=5432 user=username dbname=databasename" \ -c "COMMAND" '

No comments yet. Log in to reply on the Fediverse. Comments will appear here.