无法连接到 sql server 登录失败.“该登录名来自不受信任的域,无法与 Windows 身份验证一起使用" [英] Trouble Connecting to sql server Login failed. "The login is from an untrusted domain and cannot be used with Windows authentication"

查看:337
本文介绍了无法连接到 sql server 登录失败.“该登录名来自不受信任的域,无法与 Windows 身份验证一起使用"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试托管 SQL 服务器数据库,但是每当我尝试连接到它时,我都会收到此错误:

I am trying to host a SQL server database, but whenever I try to connect to it I get this error:

登录来自不受信任的域,不能用于 Windows身份验证

The login is from an untrusted domain and cannot be used with Windows authentication

我使用以下命令通过 Matlab 进行连接:

I am connecting through Matlab using the following command:

conn = database('Clinical_Data','DoyleLab07\Acc','','com.microsoft.sqlserver.jdbc.SQLServerDriver','jdbc:sqlserver://DOYLELAB07\SQLEXPRESS:54287;database=Clinical_Data;integratedSecurity=true;').

只要我在用于托管服务器的计算机上使用 matlab,就可以使用 matlab 连接到数据库.但是,当我使用另一台计算机和相同的 Matlab 命令时,我得到了上面显示的错误.

Connecting to the database using matlab worked fine as long as I was using matlab on the computer which I was using to host the server. However, when I use another computer and the same Matlab command I get the error I showed above.

当我查看控制面板\系统时.我注意到我的主机 PC 或我用来连接到主机的 PC 上没有列出域,但是两台计算机都在同一个工作组中.我能否通过创建域并将外部 PC 和主机添加到该域来解决我的问题?如果是这样,如何实现?

When I look under control panel\system. I notice that no domain is listed on my host PC or the PC I am using to connect to the host, but both computers are in the same workgroup. Would I be able to fix my problem by creating a domain and adding the foreign PC and the host to that domain? If so, how can this be accomplished?

任何建议将不胜感激.感谢您阅读我的帖子.

Any suggestions will be very much appreciated. Thank you for reading my post.

推荐答案

摆脱 Integrated Security=true 对我有用.

这篇关于无法连接到 sql server 登录失败.“该登录名来自不受信任的域,无法与 Windows 身份验证一起使用"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆