4
votes

When creating a new postgresql instance on the azure portal or even the CLI, the username is automatically made to be like user@databasename so i can't use it on a database string, funny enough Azure has an entire section with connection strings, for example the node.js example is

postgres://{your_username}:{your_password}@{host_name}:5432/{your_database}?ssl=true

So if we substitute the values we would end up with something like this

postgres://user@databasename:password@host.azure.com:5432/database_name?ssl=true

Can you see the problem? two @, this is completely wrong, node.js can't parse this, I have the same problem on ruby, this is not a valid url.

How can I change the username to remove the @part ?

1

1 Answers

2
votes

use %40 for the second @. It should work.