<p>在尝试使用pymssql连接到mssqlserver2012时,我得到以下错误。在</p>
<p>在Windows身份验证中,我的服务器名是SARATH,用户名是SARATH\SarathShanker,我没有设置密码。在</p>
<p>代码:</p>
<pre><code>mssql_conn=pymssql.connect(host='SARATH',user='Sarath\SarathShanker',password='',database='matrix')
</code></pre>
<p>错误:</p>
<blockquote>
<p>Traceback (most recent call last):<br/>
File "", line 1, in <br/>
File "pymssql.pyx", line 556, in pymssql.connect (pymssql.c:7990) </p>
<p>pymssql.OperationalError: (18452, 'Login failed. The login is from an untrusted
domain and cannot be used with Windows authentication.DB-Lib error message 18452
, severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\nDB
-Lib error message 20002, severity 9:\nAdaptive Server connection failed\nDB-Lib
error message 18452, severity 14:\nGeneral SQL Server error: Check messages fro
m the SQL Server\nDB-Lib error message 20002, severity 9:\nAdaptive Server conne
ction failed\n')</p>
</blockquote>
<p>为了使用pymssql连接到MSSQL服务器,我应该如何修改脚本。在</p>
<p>另外,我已经导入了pymssql。<em>(以上代码中未显示)</em></p>