无法连接到数据库
我很困惑,被困住了,已经两个小时了。
这是我的连接字符串:
<add name="yafnet" connectionString="Data Source=localhost;Initial Catalog=Scirra;User Id=Gullanian;Password=12345;" providerName="System.Data.SqlClient" />
我得到:
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'Gullanian'.
我已经创建了数据库“Scirra”。我也尝试添加登录,但似乎没有任何作用。通过 Windows 身份验证登录 SQL 管理是我访问数据库的唯一方法。
理想情况下,我只想创建一个用户,并且该用户可以完全控制数据库。所以我可以运行脚本等。
这里有一些细节:
Microsoft SQL Server Management Studio 10.50.1600.1
Microsoft Data Access Components (MDAC) 6.1.7600.16385
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 8.0.7600.16385
Microsoft .NET Framework 2.0.50727.4952
Operating System 6.1.7600
我不知道为什么它说 v2 for asp.net,我所有的应用程序池都设置为 4.0。
I'm baffled, and am stuck, and have been for 2 hours now.
Here is my connection string:
<add name="yafnet" connectionString="Data Source=localhost;Initial Catalog=Scirra;User Id=Gullanian;Password=12345;" providerName="System.Data.SqlClient" />
And I get:
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'Gullanian'.
I've created the database 'Scirra'. I've also attempted to add a login, but nothing seems to work. Logging into SQL management via Windows Authentication is the only way I can gain access to my DB's.
Ideally I just want to create a user, and that user having full control of DB. So I can run scripts etc.
Here's a few details:
Microsoft SQL Server Management Studio 10.50.1600.1
Microsoft Data Access Components (MDAC) 6.1.7600.16385
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 8.0.7600.16385
Microsoft .NET Framework 2.0.50727.4952
Operating System 6.1.7600
Idk why it says v2 for asp.net, all my application pools are set to 4.0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要启用 SQL Server 身份验证(需要重新启动)或使用 Windows 身份验证。
You need to enable SQL Server authentication (will need a restart) or use Windows Authentication.