Home Blog SQL Login failed for user in SQL Express 2012
Login failed for user in SQL Express 2012
Written by Dicky   
Thursday, 15 January 2015 09:41
AddThis Social Bookmark Button

I installed a SQL Express 2012 instance. I can login just fine with windows authentication using SQL Server Management Studio. However, after I created a new SQL user and give the correct permission to the database, I cannot connect to the SQL server using that credential.

It gives me the following error message: Login failed for user 'xxx' (Microsoft SQL Server, Error: 18456) It turns out that I have to enabled both SQL Server and Windows Authentication Mode. To do this from your management studio, right click on the server in object explorer, go to Properties - Security, and select "SQL Server and Windows Authentication Mode" under Server Authentication. That solves my problem!