我想使用 Windows 凭据对连接到 MySQL 数据库的用户进行身份验证,而不是为每个用户帐户维护单独的数据库密码。
MySQL 的商业版本通过 Windows Native Authentication 支持此功能。插件...但是,从文档中并不清楚 Connector/J JDBC 驱动程序是否支持这种形式的身份验证。
实验表明 Connector/J 不支持 Windows Native Authentication 插件...任何人都可以确认这一点,或者更好地证明它确实有效!
最佳答案
如 Restrictions on Pluggable Authentication 下所述:
The term “native authentication” used here refers to authentication against passwords stored in the
Password
column of themysql.user
table.[ deletia ]General Pluggable Authentication Restrictions
[ deletia ]
- Connector/J: Clients that use this connector can connect to the server only through accounts that use native authentication.
请注意,文档继续指出Connector/ODBC 可以使用 Windows 身份验证,因此也许您可以使用 JDBC-ODBC 桥接器?
关于mysql - MySQL Connector/J JDBC 驱动程序是否支持 Windows native 身份验证插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16920733/