This is caused by not having the SQL Server Authentication configured properly. SQL Server authentication is off by default.
Here is the solution.
- Open SQL Server Management Studio.
- Connect with Windows Authentication.
- Right click on the database server and go to properties.
- Choose the security option and check "SQL Server and Windows authentication mode".
- Enable TCP/IP connection in SQL Configuration Manager.
- Restart your SQL server.