SQL Server 2008: Login failed for user ‘username’.

Posted: June 28, 2012 in Database
Tags: ,

When I tried to config my website to connect to a newly-setup Microsoft SQL Server, I received the following error: Login failed for user ‘username’.  The user is not associated with a trusted SQL Server connection.

As it always was, Microsoft error message doesn’t give any clear clue what the reason is. After googled a while, I found the reason because I forgot to enable sql authentication in sql server settings.

So the resolution is very simple, just open the Server Properties in SQL Server Management Studio, under Security, set the server authentication mode to SQL Server and Windows Authentication mode.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s