In this video, I’ll show you exactly how to reset your forgotten PostgreSQL and pgAdmin 4 master password on Windows 11/10 without losing any of your data or having to reinstall everything!
If you are getting the frustrating "connection failed: no password supplied" or "password authentication failed" error in pgAdmin 4, don't panic. We will walk through the exact configuration files you need to tweak to bypass the lock and set up a brand-new secure password in less than 3 minutes.
Path of pg_bha.conf
-------------------------------------
C:\Program Files\PostgreSQL\16\data\pg_hba.conf
Set Password:
-------------------------
ALTER USER postgres WITH PASSWORD 'yournewpassword';
Hope you like this!