[踩雷] Login failed for user ”. Reason: An attempt to login using SQL authentication failed
最近在Mac 上架了Docker起了一台mcr.microsoft.com/azure-sql-edge
用Azure Data Studio可以透過 Connection String登入
以下為範例1
Server=localhost;Trusted_Connection=False;Integrated Security=False;User ID=sa;Password=XXXXXXXXXX;Database=wexflow_netcore;trustservercertificate=true",
興高采烈的把這個連線字串配置到Config中,結果跑CLI過不了,得到Docker Logs資訊如下
2023-08-23 02:58:28.50 Logon Login failed for user ”. Reason: An attempt to login using SQL authentication failed. Server is configured for Integrated authentication only. [CLIENT: 192.168.215.1]
他給的訊息是說Server is configured for Integrated authentication only.整整誤導了我1個小時
Try了老半天,最後竟然是發現那個可惡的User Id的d要給我小寫就過了!
如下
Server=localhost;Trusted_Connection=False;Integrated Security=False;User Id=sa;Password=XXXXXXXXXX;Database=wexflow_netcore;trustservercertificate=true"
總覺得這個不是很意外的錯誤,但竟然有種被 誤導的羞恥感…
謹記!