Change database username format

Alberto Salazar 1 Reputation point

I have an architecture deployed and a DNS upper this. With this I can change the db server without impacting the final services. In this case If I need to do this change I have to change also the username into all services just because the username is attached with the servername.

I saw that the username format is not as regualar databases installations. With Azure the format is username@Testta . Can I change this? I would like to use the regular expression <username> instead <username@servername>

Azure Database for PostgreSQL
{count} votes

2 answers

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 13,961 Reputation points MVP

    Hi @Alberto Salazar

    As mentioned in the documentation, when connecting to the service, the username in the connection string for authentication needs to be specified in the format username@servername. It’s also important to note that all popular driver frameworks viz JDBC, PHP, ADO.Net, Nodejs, Python, Golang, etc. support this specification. Further, we have also worked with the community and updated some of the drivers which no longer require you to specify this format. The following is the list of drivers which no longer require this format:

    Java - MariaDB Connector/J: since version 2.2.5+
    C/C++ - MariaDB Connector/C: since version 3.0.5+
    PHP - mysqlnd: since PHP 7.2.23+; PHP 7.3.10+

    To understand this requirement for Azure Database for MySQL, you first need to understand the underlying architecture and design of the service. Below is the architecture for Azure Database for MySQL.

    Please don’t forget to Accept the answer and up-vote wherever the information provided helps you, this can be beneficial to other community members.

  2. KalyanChanumolu-MSFT 8,316 Reputation points

    @Alberto Salazar Changing the username format is not currently supported on Azure Database for PostgreSQL.
    There is an open feedback item on our UserVoice. The product team prioritizes features based on the interest from customers.
    Please upvote for the same so that you can get updates when the feature is released.


    If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.

    0 comments No comments