SQL Server LocalDB

Problem

error message:
Unable to open the database.

The error message was:

SQL Server Network Interfaces: Error occurred during LocalDB instance startup: SQL Server process failed to start. [x89C5010A]

error message:
Your SQL Server installation is either corrupt or has been tampered with (Unknown package id). Please uninstall then re-run setup to correct this problem.

Solution

1. Open Command Prompt
2. Type sqllocaldb start v11.0 (if it starts then the next steps are not needed)
3. If it does not start then type sqllocaldb delete v11.0
4. Next type sqllocaldb create v11.0
5. Next type sqllocaldb start v11.0

If you cannot start the service, uninstall and reinstall SQL Server LocalDB, reboot and retry

NOTE: If the program does not let you start local db, here are some other options:
sqllocaldb info v11.0 (This lets you see if things are looking right)
sqllocaldb stop v11.0 -k (This kills the service. This is sometimes needed if the login fails.