2008年12月21日星期日

Reset PostgreSQL password

As we know. PostreSQL database was free. So, quite of number people used it in theire application. Nowadays, too many username and password need to remember. Sometime, we may forgot our username and password.

Here.. I would like to take the opportunity to explain “How to reset your PostgreSQL Database username and password”.

Get back your PostgreSQL username

  1. Open file called pg_auth. This file was listed all the users used for PostgreSQL. You can get this file at {Postgre_install_path}\{postgre_version}\main\pgdata\global\. However, this may different with your installation.

Reset PostgreSQL Password

  1. Open file called pg_hba.conf andlooking for “md5″ (at the bottom of the file). Changed the md5 trust. This file normally will located at {Postgre_install_path}\{postgre_version}\main\
  2. Restart your PostgreSQL Database.
  3. Enteryour new password.
  4. Do the samething as step 1. Change trust back to md5
  5. Restart your PostgreSQL Database.

没有评论:

发表评论