c# - MySqlConnection ignores incorrect password when SQL username matches Windows account
问题描述
I have MySql Server with authentication_windows.dll plugin. There I have windows account "test_win" and sql user "test_sql" with password "test".
Even if Integrated Security is set to false, as long as user id matches existing windows account, the connection is opened without any error.
I am trying on MySQL80 Enterprise with authentication_windows.dll plugin.
Example of my connection string:
server=localhost;user id=test_win;database=mydb;Integrated Security=False;password=incorrect
using (var connection = new MySqlConnection(connectionString))
{
connection.Open();
}
Actual result: connection is opened and validated I would expect "Access denied for @test_win (using password: YES)"
How can I force account validation except for Integrated security = false ?
Additional information:
Tested same scenario on MsSql with expected result
Data Source=localhost;Initial Catalog=mydb;User ID=test_win;Password=incorrect
Exception: Login failed for user 'test_win'
using (var connection = new SqlConnection(connectionString)
{
connection.Open();
}
解决方案
推荐阅读
- kubernetes - Cloud Build - 无法识别“推出重启”(未知命令)
- android - 防止在整个应用程序中双击组件
- java - Java仿射变换绘制路径
- php - 如何在 Laravel 中创建和使用自定义的每日日志文件?
- sql-server - 确定远程表中新创建记录的 UniqueIdentifier id
- windows - SCOM - 单服务器域管理和代理问题
- android - 使用 Json.stringfy 在 React Native 中保存到 AsyncStorage 后如何获取 JSON.parser 值?
- android - 将应用程序移至图书馆时生成 BR 失败
- python - 如何在 Radish 测试框架中打印 step 变量?
- reactjs - 如何在选择之前增加我的图标周围的可点击区域?