I created a postgresSQl database with the option private access. And I followed this tutorial:
https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/quickstart-create-connect-server-vnet
And I followed all the steps. And in powershell I installed all the necessary libraries:
sudo apt-get update
sudo apt-get install postgresql-client
wget --no-check-certificate https://dl.cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem
But if I now want to connect to the postgresDatabase with the command in powershell:
azureuser@vminternetsuite-test:~$ psql --host=db-internetsuite2-0-test-demo.postgres.database.azure.com --port=5432 --username=internetsuite2admin --dbname=postgres --set=sslmode=require --set=sslrootcert=DigiCertGlobalRootCA.crt.pem
I get this error:
psql: could not translate host name "db-internetsuite2-0-test-demo.postgres.database.azure.com" to address: Name or service not known
And I installed the database, vm machine and the virtual network in the same Region: France-Central.
Question: How resolve the error: psql: could not translate host name "db-internetsuite2-0-test-demo.postgres.database.azure.com" to address: Name or service not known
?