[英]Login failed while connecting to SQL server using MacOS terminal
I'm trying to create a Distributed SQL Server Cache table for a .NET Core project using this command:我正在尝试使用以下命令为 .NET 核心项目创建分布式 SQL 服务器缓存表:
dotnet sql-cache create "Server=localhost;Database=CacheDb;User Id=SA;Password=Some123\;@#;" dbo DataCache
The password is Some123!@#
, so I'm trying to escape the special characters using \
but it doesn't see to work as I'm getting: An error occurred. Login failed for user 'SA'.
密码是Some123!@#
,所以我正在尝试使用\
转义特殊字符,但它没有看到我得到的工作: An error occurred. Login failed for user 'SA'.
An error occurred. Login failed for user 'SA'.
I have an image of microsoft/mssql-server-linux
running in a docker container.我有一个在 docker 容器中运行的microsoft/mssql-server-linux
的映像。 The version is Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)
.版本为Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)
。
I'm able to run my web applications using that connection string (without needing to escape special characters), but I'm unable to make that connection string work using Terminal command.我可以使用该连接字符串运行我的 web 应用程序(无需转义特殊字符),但我无法使用终端命令使该连接字符串工作。
Any help is appreciated.任何帮助表示赞赏。 Thank you!谢谢!
\!
in double quote will still be \!
在双引号中仍然是\!
. . You can use single quotes:您可以使用单引号:
[STEP 101] $ echo "Some123!@#"
bash: !@#: event not found
[STEP 102] $ echo "Some123\!@#"
Some123\!@#
[STEP 103] $ echo 'Some123!@#'
Some123!@#
[STEP 104] $
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.