Skip to content

Latest commit

 

History

History
 
 

task-001-connecting-to-db

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
  • Use the following command
$ psql -h <hostname> -p <port-usually-5432> --username=admin -d <database-name>     
Password for user admin: 
  • If the database is newly created and does not contain any other databases, then you can use postgres as DB name. This is present by default.
$ psql -h <hostname> -p <port-usually-5432> --username=admin --db postgres
Password for user admin: