要查看MySQL的native_password
插件,您需要登录到MySQL服务器并查询mysql.user
表
your_username
和your_password
替换为实际的用户名和密码):mysql -u your_username -p
SELECT user, host, authentication_string, plugin FROM mysql.user;
plugin
的列,其中显示了每个用户的身份验证插件。要查找使用native_password
插件的用户,请查找plugin
列中值为mysql_native_password
的行。例如,假设您的结果集如下:
+------------------+-----------+-------------------------------------------+-----------------------+
| user | host | authentication_string | plugin |
+------------------+-----------+-------------------------------------------+-----------------------+
| root | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | mysql_native_password |
| another_user | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | mysql_native_password |
| some_other_user | localhost | | auth_socket |
+------------------+-----------+-------------------------------------------+-----------------------+
在这个例子中,root
和another_user
使用mysql_native_password
插件进行身份验证,而some_other_user
使用auth_socket
插件。