Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connection to Azure postgres server fails in spite of correct username

When trying to connect to my postgres server in Azure from psql client, I get the following error, even though I am using the correct username. How can I fix this?

psql: FATAL: Invalid Username specified. Please check the Username and retry connection. The Username should be in <username@hostname> format.

like image 326
Shantanu Avatar asked May 16 '17 19:05

Shantanu


People also ask

What port is used to communicate with Azure Database Postgres?

To access Azure Database for PostgreSQL from your local computer, ensure that the firewall on your network and local computer allow outgoing communication on TCP port 5432.


1 Answers

As noted in the error text, you are required to follow the <username@hostname> format when trying to connect to postgresql server, whether you are doing it from psql client or using pgadmin. Using <username@hostname> format instead of just <username> should get rid of the error.

Read the quick-start documents for Azure portal and CLI to understand more about how to create and configure your postgres server.

like image 105
Shantanu Avatar answered Oct 20 '22 23:10

Shantanu