Feb 23, 2023

"Login failed for user" to connect SQL Server with SQL Server Authentication

This is caused by not having the SQL Server Authentication configured properly. SQL Server authentication is off by default.

Here is the solution.

  1. Open SQL Server Management Studio.
  2. Connect with Windows Authentication.
  3. Right click on the database server and go to properties.

  4. Choose the security option and check "SQL Server and Windows authentication mode".


  5. Enable TCP/IP connection in SQL Configuration Manager.


  6. Restart your SQL server.