0

I've been struggling with this problem for a while. When I tried to connect to my database I'm getting the error 18456: "Login failed for user ". I've checked all my settings and everything seems to be fine. If I access to the server via Windows Authentication there's no problem and I can reset the password of my user, and everything works again just for a couple hours and then I'm getting the same error again.

Do you know what the problem could be?

Maw Ceron
  • 319
  • 3
  • 9

2 Answers2

0

I faced the same situation and found the reason as missing "SQL Server authentication mode" enabled. Maybe you can try the answer in another post

Joe Lau
  • 439
  • 5
  • 10
-1

The reason behind the error is hidden as to improve security. In an SQL server error log there should be an error state. If you go to this site there is a table with what your problem is. The info is here anyway:

state 2: User ID is not valid.

state 5: User ID is not valid.

state 6: An attempt was made to use a Windows login name with SQL Server Authentication.

state 7: Login is disabled, and the password is incorrect.

state 8: The password is incorrect.

state 9: Password is not valid.

state 11: Login is valid, but server access failed.

state 12: Login is valid login, but server access failed.

state 18: Password must be changed.

  • 1
    Please copy the relevant information from behind the link into the answer. In ten years this question may still be relevant, but the link will likely be broken. – James Feb 20 '17 at 16:03