🖥️Setup DBGate

This page will guide you to install and setup DBGate correctly on your machine.

Installing DBGate

Head over to the official downloads page for DBGate and select the correct version for your operating system and install it.

Configuring Login Entra ID Admin

Identifying your username

For Entra ID based authentication, you need your username, which is referred to as userPrincipalName in Entra ID. Run this command to get your userPrincipalName:

az ad signed-in-user show --query "[userPrincipalName]" -o tsv

Creating an access token

Run this command to generate an access token for accessing PostgreSQL databases:

az account get-access-token --resource-type oss-rdbms --output yaml

You will see your access token with additional information like expiry time.

Creating a Database Connection

  • Open DBGate and fill in the connection details. Don't forget to name this database, so you can identify it in the future. Here we are using MRPN Database - AZ Auth for the name so we remember that this database was configured with our AZ CLI generated access token.

  • Enable SSL for connectivity, as it is mandatory for connectivity. Once done, hit the Test Button, if you see a green check with success message, save the database using the Save button.

Configuring with DB Admin Account

You will need the admin account from the previous step here to be able to log in as an Administrator (not to be confused with Entra Admin)

  • Duplicate the connection you created from the previous step by right-clicking on the database.

  • Now edit the newly created connection copy, by right-clicking on it and selecting Edit

  • Replace your username and password with the admin credentials, name the database so you can identify this connection has your DB Admin credentials, here we will use the name MRPN Database - DB Admin so we can reference it correctly in the future. Don't forget to use the Test button to verify connectivity and if saving it using the Save button.

Last updated