pg_hba.conf
to allow you to connect without a password. Then use ALTER USER to reset the password. Then change pg_hba.conf back again.pg_hba.conf
file, change (temporarily) all METHOD
with trust
. EG :pg_hba.conf
is located by typing in a psql command line:pg_hba.conf
file at path e.g. C:Program FilesPostgreSQL10data
and add below line at the end,pg_ctl
is a command line (Windows) program not a SQL statement. You need to do that from a cmd.exe
. Or use net start postgresql-9.5
pg_ctl
manually, e.g. Msi supercharger. using:psql
requires every SQL command to be terminated with ;
in your case it's simply waiting for you to finish the statement.net start postgres_service_name