I am on Windows 10 using WAMP, I added PostgreSQL and PhpPgAdmin, everything was working fine. Today I can not log in to PostgreSQL through PhpPgAdmin or a php_pdo web app.
I tried editing pg_hba.conf
in 2 locations c:\PostgreSQL\pg96\init\
and c:\PostgreSQL\data\pg96\
and changed the 'method' to trust
as per many answers here, none of the CLI answers worked either.
I also restarted "WAMP" and even the whole computer, but no luck.
The default password worked before postgres
and root
but not now.
How do I reset the postgre password?
UPDATE
runing psql -U postgres
returns;
psql: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
contents of pg_hba.conf
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# IPv4 local & remote connections:
host all all 127.0.0.1/32 trust
host all all 0.0.0.0/0 trust
# IPv6 local connections:
host all all ::1/128 trust