Changes between Initial Version and Version 1 of Postgres HowTo login without password


Ignore:
Timestamp:
08/30/16 12:32:08 (8 years ago)
Author:
Richard Bramley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Postgres HowTo login without password

    v1 v1  
     1= Postgres HowTo login without password
     2
     3tags: [[postgres]] [[HowTo]]
     4
     5== Procedure
     6
     71. Create a file in your home directory called `.pgpass`
     82. The contents of this file should take the format:
     9{{{
     10hostname:port:database:username:password
     11}}}
     12
     13    For example, here the port and database have been left blank:
     14{{{
     15localhost:*:*:username:password
     16}}}
     17    You may have to add a record for `127.0.0.1` as well as `localhost`.
     183. Make sure that the file has the correct permissions by running: `chmod 600 .pgpass`
     194. Connect using the following command:
     20{{{
     21psql -U username -d dbname
     22}}}
     23
     24
     25
     26[[BackLinks]]