psql connect to remote database
psql is a linux command utility to connect to remote as well as local postgres database.
To connect to a local database,
su postgres
psql (This will take you to default database ( postgres ) )
If you are specific about a particular database,
su postgres
psql DataBaseName
To connect to a database in a remote system,
psql -h 192.168.51.18 -p 5432 -d HQ
where ,
-h -> Host name / IP Address
-p -> Port Number
-d -> Database
Reference:
http://www.postgresql.org/message-id/001f01c018c2$830133b0$64898cd5@northlink.gr
psql is a linux command utility to connect to remote as well as local postgres database.
To connect to a local database,
su postgres
psql (This will take you to default database ( postgres ) )
If you are specific about a particular database,
su postgres
psql DataBaseName
To connect to a database in a remote system,
psql -h 192.168.51.18 -p 5432 -d HQ
where ,
-h -> Host name / IP Address
-p -> Port Number
-d -> Database
Reference:
http://www.postgresql.org/message-id/001f01c018c2$830133b0$64898cd5@northlink.gr
No comments:
Post a Comment