This is the most common error in SQL Server. If you are connected to the network and have also a domain member then this error occurs when you set the SQL Server Authentication as "Windows Authentication mode" and trying to connect with SQL Server credentials.
If we are trying to connect using "SQL Server Authentication" then Login to Microsoft SQL Server Error: 18456 is occurred.
In this case, we must have to modify our server authentication by using the following steps in the Microsoft SQL Server Management Studio in the object explorer:
Right click on the SQL Server and click Properties as given below -
In SQL Server Properties window, Go to the Security page and under Server authentication section choose the SQL Server and Windows Authentication mode radio button and Click OK button to close window as given below -
To immediate effect, just go the window services section and Restart the SQL Services as given below -
To avoid this kind of issues, we suggest to install SQL Server within mixed mode authentication which always allow to enable both authentication modes (SQL Server and Windows Authentication mode ).