简体   繁体   中英

Login failed for user (Microsoft SQL Server error:18456)

Some background on the issue: Windows' Safe Mode is an essential tool. On computers infected with malware or crashing because of buggy drivers, Safe Mode starts your PC with a minimal set of drivers and services. No third-party software or drivers get loaded, and even the built-in Windows stuff is limited to just what's necessary. Safe Mode is a great way to remove problem-causing software—like malware—without that software getting in the way. It also provides an environment where you may find it easier to roll back drivers, and use certain troubleshooting tools.

My former Windows account was blocked in which I created another through safe mode.

Now when I try to login to SQL Server, I get this error:

Login failed for user (Microsoft SQL Server, error: 18456)

I'm guessing that you are using windows authentication to login to your SQL Server instance. Since you installed your current instance with the other user account and trying to logging in with different one you get this error.

You have two options:

  1. Create another instance with current user account.

  2. Login to windows with your previous account, login to SQL server, change password for sa account and you can login from anywhere with sa user and password.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM