DebugAH

How to Solve Your Programmer Error

Skip to content
  • Home
  • Linux
  • JAVA
  • Python
  • Javasript
  • MYSQL
  • Windows
  • Error

Trouble Connecting to sql server Login failed. “The login is from an untrusted domain and cannot be used with Windows authentication”

Trouble Connecting to SQL server Login failed. “The login is from an untrusted domain and cannot be used with Windows authentication”
Answer 1:
Getting rid of Integrated Security=true worked for me.Answer 2:
If your SQL Server is on one domain controller and you are trying to connect to it from another domain controller then you will get this error when

IntegratedSecurity = true;

This will happen even if you include a valid SQL Server username and password in your connection string as they will automatically be over-written with your windows login and password. Integrated security means simply – use your windows credentials for login verification to SQL Server. So, if you are logged in to a different domain controller then it will fail. In the case where you are on two different domain controllers then you have no choice but to use

IntegratedSecurity = false;

Now, when Integrated security is false SQL Server will use the SQL Server login and password provided in your connection string. For this to work, the SQL Server instance has to have its authentication mode configured to mixed mode, being, SQL Server and Windows Authentication mode.
To verify or change this setting in SQL Server you can open the SQL Server Management Studio and right-click on your server name and then select Properties. On the pop-up that appears select Security and you will see where to alter this setting if you need to.

Modified as below:
<connectionStrings>
<add name=”DataAccess” providerName=”System.Data.SqlClient” connectionString=”database=Hotel;server=127.0.0.1,1433;UID=sa;PWD=123456;Current Language=English;Connection Timeout=120;” />
</connectionStrings>

Similar Posts:

  • [Solved] No connection string named ‘TestEntities’ could be found in the application config file
  • Solutions to database connection problems: “connections could not be acquired from the underlying database!”
  • Use of wmic Intranet
  • The use of libpqxx interface in Linux solves the error of PSQL: connections on UNIX domain socket “/TMP/.S.pgsql.5432”
  • For the problem of establishing SSL connection in mysql, set usessl = false to explicitly disable SSL, or set usessl = true
  • SQL Server 2019 opens the data file MDF with an error
  • [Solved] ER_NOT_SUPPORTED_AUTH_Mode node connection database error
  • [Solved] SSH connect error: permission denied, please try again
  • [Solved] Error 1054 (42s22) unknown column ‘password’ in ‘field list’ when updating the password of mysql5.7 or above
  • [How to Solve] nodejs mysql ER_NOT_SUPPORTED_AUTH_MODE

This entry was posted in MYSQL and tagged The login is from an untrusted domain and cannot be used with Windows authentication, Trouble Connecting to sql server Login failed on September 11, 2021 by Robins.

Post navigation

← [Solved] PHP Hprose Client Error: ‘Tag ‘RAEz’ expected Causes and solutions of error reporting in require setting dynamic path →

Recent Posts

  • [Solved] must appear in the GROUP BY clause or be used in an aggregate function
  • [Solved] Shell Error: syntax error: invalid arithmetic operator (error token is “
  • [Solved] FATAL ERROR: wasm code commit Allocation failed – process out of memory
  • [Solved] Mac Error: ERROR launching ‘JD-GUI’
  • [Solved] passwd: Authentication token manipulation error
  • [Solved] xtrabackup: error: xb_load_tablespaces() failed with error code 57
  • [Solved] Azure Function Enable Managed Identity and Powershell Funciton Report Error: ERROR: ManagedIdentityCredential authentication failed
  • [Solved] Application_Error not firing when customerrors = “On”
  • [Solved] MAVEN-COMPILER-PLUGIN Compile Error: FATAL ERROR: UNABLE TO FIND PACKAGE JAVA.LANG IN CLASSPATH OR BOOTCLASSPATH
  • [Solved] Json.Net Error: Error getting value from ‘ScopeId’ on ‘System.Net.IPAddress’

Tags

  • )
  • android
  • android studio
  • CentOS
  • centos7
  • chrome
  • DebugAH
  • django
  • docker
  • eclipse
  • git
  • github
  • go
  • hadoop
  • Hive
  • IDEA
  • ios
  • java
  • jenkins
  • Linux
  • Mac
  • maven
  • MyBatis
  • mysql
  • nginx
  • No module named XXX error
  • npm
  • Oracle
  • php
  • pip
  • pycharm
  • Python
  • Python TypeError
  • redis
  • shell
  • spring
  • springBoot
  • ssh
  • SVN
  • tensorflow
  • tomcat
  • ubuntu
  • vue
  • Windows
  • Yum
Proudly powered by WordPress