xxxxxxxxxx
psql -U <postgres> <Enter>
# enter password
# List databases:
\l
#change or select database
\c <dbname>
You are now connected to database "<dbname>" as user "postgres".
<dbname>=#
xxxxxxxxxx
psql -d geo -h 192.168.1.12 -p 5432 -U supervisor
// geo is a database and supervisor is a user
// Once on postgres you can change the database by typing
\c postgres
xxxxxxxxxx
bash-4.2$ psql -h <hostname or ip address> -p <port number of remote machine> -d <database name which you want to connect> -U <username of the database server>
xxxxxxxxxx
import sqlalchemy
engine = sqlalchemy.create_engine('postgresql://username:password@localhost/mydatabase')