Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

sql-server

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

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

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;'). 

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.

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.

like image 397
Gaven Avatar asked Sep 04 '13 00:09

Gaven


People also ask

Can't connect to server Login failed the Login is from an untrusted domain and Cannot be used with integrated authentication?

If you receive error 'The login is from an untrusted domain', this may mean that you changed password on your working machine and now need to update password on SQL Server machine.

Can not connect to SQL Server Login failed for user?

The generic message “Login Failed for User (Microsoft SQL Server, Error: 18456)” means you entered invalid credentials when logging into SQL Server.


1 Answers

Getting rid of Integrated Security=true worked for me.

like image 138
Shahid Miah Avatar answered Sep 21 '22 16:09

Shahid Miah