The user of a postgres database can wish to access the database engine without having to enter the key.
To achieve this we must create the file ". Pgpass" in the user's home directory you want to enter without the password.
The file should contain lines with the following format.
- hostname: port: database: username: password
- hostname -> type "localhost" if the database is in the same team, should be on another team enter the ip or name of the computer on the network.
- port -> you must enter the port number for connection to postgres, default port postgres connection is "5432."
- database -> you must write the name of the database to which you wish to enter.
- username -> you must type the user name with which you want to access the database.
- password -> you must enter the password used by the user to access the database.
- ls-la. Pgpass
- -rw ------- 1 username groupname fechamodificacion size. Pgpass
- chmod 600. Pgpass
0 comments:
Post a Comment