One, PostgreSql9.6 reset the password method; 1. Open Windows Service Manager, locate the "postgresql-x64-9.6" service, and stop the service. 2, find PostgreSQL9.6 installation directory (in my E-disk example: E:\Program files\postgresql\9.6\data) Under the permissions profile: pg_hba.conf3, open the file, drag to the end of the file, see the following configuration information.
4, online has classmate said will change IPV4 that line "METHOD" changed to trust, after trying to find not. In the actual test, we need to change the "METHOD" of the IPV6 line to "trust". Save, such as: 5, restart the "postgresql-x64-9.6" service. 6. Open the Windows Command window and go to PostgreSQL9.6 's installation bin directory (in my E-drive example: E:\Program files\postgresql\9.6\bin), execute the following command:
psql-d template1-u postgres-c "alter role postgres password ' newly set password ';"
7, in the pgadmin with the new password can be landed.
Fix a problem with resetting the PostgreSQL 9.6 password