Problem: When you are trying to login into SQL Server with a new User Name and you see this error: Login failed for user. (Microsoft SQL, Error: 18456), see the solution below:
- Log in to SQL Server with the user name that has access to the Server Instance, normally this will be your Windows Authentication Login
- The first thing you want to enable is the "Server Authentication" mode, allow both SQL Server and Windows Authentication mode.
- Go to "Server Instance" right on top where your SQL Data Engine shows, right-click
- Navigate to "Security" and check "SQL Server and Windows Authentication mode" this will allow Server Authentication.
[Important]: If you happen to make any Server changes, it is advisable to restart the SQL Server Services, Consult with your team if this is a production server.
- If the above did not work for you? continual....
- Navigate to the "Security Object" in "Object Explorer" Panel and expand the "Logins" folder
- Find the user name that has problems logging in,
- Right-click on the user name and click on "Properties"
- Make sure that the Password is set on the "General" Tab
- Make sure that proper privileges are set on the "Server Roles" Tab
- Make sure that proper "Mapping" is correct for the database the user needs to have access to on the "User Mapping" Tab
- Most importantly verify that the user has access granted in the "Status" Tab.