What is the properties in MySQL flexible server that differentiate Authentication mode

Mehta, Arun [GTSUS NON-J&J] 0 Reputation points
2023-01-20T15:22:35.25+00:00

Trying to fetch the details of the get call for MySQL flexible server with different authentication methods, getting same result set for all. Is their any property that can be check to know the authentication methods.

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
713 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jordi Rojas 266 Reputation points
    2023-01-20T15:34:00.01+00:00

    Hi Mehta,

    MySQL flexible server supports different authentication methods such as MySQL Native Password, SHA256 Password, and caching_sha2_password.

    The authentication method used by a client can be determined by checking the value of the authentication_string column in the mysql.user table for the user being authenticated.

    You can also check the plugin column in the mysql.user table to determine the authentication plugin being used for a user.

    Additionally, the mysql_options table also contains the authentication_string column which you can use for the same purpose.

    You can use the query like this:

    SELECT plugin, authentication_string FROM mysql.user WHERE user='your_user_name';  
    

    This will give you the plugin and authentication_string used for the user you specified.