How to access a fresh install of SQL Server 2012? I've performed a fresh install of SQL Server 2012 on my local development PC. I've done this before and it has worked, however this time I'm getting the following error message when I attempt to sign into SQL Server. 

"Login failed for user xxxxxxxxxx (Microsoft SQL Server, Error: 18456)"

How can I access my local instance of SQL Server? I'm rather ignorant about SQL Server security.
Since you have access to the machine itself, you can follow the instructions here to (re)add yourself as a sysadmin: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/connect-to-sql-server-when-system-administrators-are-locked-out

The short version of what that says is:


Stop SQL Server
Restart with the minimal configuration option -m
Log into the server with sqlcmd -S {your machine name or localhost}
Run the following commands:


CREATE LOGIN [Domain\LoginName] FROM WINDOWS;
EXEC sp_addsrvrolemember '[Domain\LoginName]', 'sysadmin';

Stop SQL Server
Restart it with the normal configuration