Postgresql: Difference between revisions
Jump to navigation
Jump to search
(→psql) |
|||
Line 2: | Line 2: | ||
Connect to remote database: | Connect to remote database: | ||
export PGPASSWORD=password && psql --host=10.111.222.1 --port=5492 --username=user --no-password postgres | export PGPASSWORD=password && psql --host=10.111.222.1 --port=5492 --username=user --no-password postgres | ||
=install psql= | |||
apt-get install freetds-bin | |||
=List databases= | =List databases= | ||
SELECT datname FROM pg_database; | SELECT datname FROM pg_database; |
Revision as of 12:44, 18 December 2018
psql
Connect to remote database:
export PGPASSWORD=password && psql --host=10.111.222.1 --port=5492 --username=user --no-password postgres
install psql
apt-get install freetds-bin
List databases
SELECT datname FROM pg_database;