如何查看用户密码使用的是哪个mysql认证插件?

g.d*_*ado 13 mysql

假设我创建了两个用户,他们都使用两个不同的身份验证插件:

CREATE USER IF NOT EXISTS 'rachel' IDENTIFIED WITH mysql_native_password BY 'super_secure_password';

CREATE USER IF NOT EXISTS 'bob' IDENTIFIED WITH caching_sha2_password BY 'amazing_password';
Run Code Online (Sandbox Code Playgroud)

请注意用户如何使用 2 个不同的身份验证插件:

  • 用户rachel正在使用mysql_native_password
  • 用户bob正在使用caching_sha2_password

我如何查询 mysql 来检索有关我的用户的信息?

g.d*_*ado 19

select user, plugin from mysql.user;