SQL 无法连接到 (LocalDB)\MSSQLLocalDB -> 用户“User-PC\User”登录失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36950078/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot connect to (LocalDB)\MSSQLLocalDB -> Login failed for user 'User-PC\User'
提问by Musakkhir Sayyed
I am getting an error, While I am trying to connect (LocalDB)\MSSQLLocalDB through SQL Server management studio. I also tried to login with default database as master the error is same.
当我尝试通过 SQL Server 管理工作室连接 (LocalDB)\MSSQLLocalDB 时,出现错误。我还尝试使用默认数据库作为 master 登录,但错误相同。
回答by Musakkhir Sayyed
The following command through sqllocaldb utility works for me.
通过 sqllocaldb 实用程序的以下命令对我有用。
sqllocaldb stop mssqllocaldb
sqllocaldb delete mssqllocaldb
sqllocaldb start "MSSQLLocalDB"
After that I restarted the sql server management studio, and it is successfully established connection through (LocalDB)\MSSQLLocalDB
之后我重新启动了sql server management studio,它通过以下方式成功建立了连接 (LocalDB)\MSSQLLocalDB