Skip to main content

๐Ÿ‘ Connect to the Database

Add a new connectionโ€‹

We can store the credentials of our database so in the next session we can quickly re-connect. In this case, we'll create a new connection selecting "Add a new connection".

Select PostgreSQL as Database Typeโ€‹

Then we'll select PostgreSQL as our source database.

Selecting PostgreSQL as Database

Enter connection detailsโ€‹

Enter the details for the PostgreSQL database you will be migrating from.

  • It's important to click on the SSL tab and activate Use SSL (SSL mode Prefer is fine), otherwise we won't be able to connect to cloud hosted databases.
  • If your instructors have configured a server for you to use, ask them for the host name, username and password.
info

๐Ÿ‘ If you have followed the steps to configure PostgreSQL in Instruqt / GitHub Codespaces, the hostname will be localhost, username postgres and password postgres.

  • Click back on the General tab and enter the database name as library.
  • Check the Save password box if you want to save the password for future connections.
  • Click Test Connection to ensure your details are correct. You should see a message saying "PostgreSQL database connection successful."
  • Click Connect to proceed to the next step.
  • You can give your connection a name and a tag to make it simpler to remember later.
Screenshot of the connect modal