要查看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
插件。