Hi @Dnaq2020 , welcome to Microsoft Q&A forum.
It seems you are trying to connect Azure Database for PostgreSQL through CLI commands using Bash but facing the error. This error can come due to multiple reasons:
- If we are putting the fully qualified server name ending with 'postgres.database.azure.com', we just need to use the server name.
- If the server name or resource group name is wrong
Another thing is, the command you are using is related to Azure PostgreSQL Single Server. And if you have created the flexible server then also it will not work and similar error could come.
Could you please check if you have created flexible server as mentioned in the below screenshot?
If yes, then please use the below command to connect to it:
az postgres flexible-server db list --resource-group <rescgrp> --server-name <yourservername>
You can find more details on below link:
Please let us know if this helps or else we can discuss further on the issue.
----------
If answer is helpful you can click on as it helps other members of the Microsoft Q&A community who have similar questions and are looking for solutions. Thank you for helping to improve Microsoft Q&A!