Introduction:
If you are getting error as "Login failed for user 'sa'. (Microsoft SQL Server, Error: 18456)" while connecting to SQL Server with SQL Server Authentication mode .
To resolve the issue, do the following steps.
Open SQL Server Management Studio > Login with Window Authentication mode > Right click on object Explorer Server Name > Select Properties
From Server Properties > Security Tab > Server authentication > Select SQL Server and Windows Authentication Mode CheckBox.
Clock on OK button > It says "Some of your configuration changes will not take effect until SQL Server is restarted." > from services.msc restart SQL Server Service.
Hope it resolves the issue otherwise check your username under Security/Logins.