Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot connect to (LocalDB)\MSSQLLocalDB -> Login failed for user 'User-PC\User'

I am getting an error, While I am trying to connect (LocalDB)\MSSQLLocalDB through SQL Server management studio. I also tried to login with default database as master the error is same.

enter image description here Here is the Server details. enter image description here

like image 792
Musakkhir Sayyed Avatar asked Apr 30 '16 02:04

Musakkhir Sayyed


People also ask

How do I connect to LocalDB in SQL?

In the Command Prompt window, type the following command: SqlLocalDB create NewInstance and press the Enter key. The message will appear which indicates that the LocalDB instance is created: LocalDB instance “NewInstance” created with version 13.0.

How do I enable LocalDB?

Install LocalDB through the installation wizard or by using the SqlLocalDB. msi program. LocalDB is an option when installing SQL Server Express LocalDB. Select LocalDB on the Feature Selection/Shared Features page during installation.


1 Answers

The following command through sqllocaldb utility works for me.

sqllocaldb stop mssqllocaldb sqllocaldb delete mssqllocaldb sqllocaldb start "MSSQLLocalDB" 

enter image description here

After that I restarted the sql server management studio, and it is successfully established connection through (LocalDB)\MSSQLLocalDB

like image 181
Musakkhir Sayyed Avatar answered Oct 12 '22 12:10

Musakkhir Sayyed