title: Cannot connect to MSSQL server management studio as localhost
body: <p>I installed MSSQL server 2016 with configuration manager and management studio. I trying connect to SQL server via management studio:</p>
  
  <ul>
  <li>Server type: Database Engine</li>
  <li>Server name: localhost</li>
  <li>Authentication: Windows Authentication</li>
  </ul>
  
  <p>Error TITLE: Connect to Server:</p>
  
  <blockquote>
    <p>Cannot connect to localhost. A network-related or instance-specific
    error occurred while establishing a connection to SQL Server. The
    server was not found or was not accessible. Verify that the instance
    name is correct and that SQL Server is configured to allow remote
    connections. (provider: Named Pipes Provider, error: 40 - Could not
    open a connection to SQL Server) (Microsoft SQL Server, Error: 2) The
    system cannot find the file specified</p>
  </blockquote>
  
  <p>Nothing more information in event viewer. I have these services with states:</p>
  
  <ul>
  <li>SQL Server (SQLEXPRESS) - Running</li>
  <li>SQL Full-text Filter Daemon Launcher (SQLEXPRESS) - Running</li>
  <li>SQL Server Launchpad (SQLEXPRESS) - Running</li>
  <li>SQL Server Reporting Services (SQLEXPRESS) - Running</li>
  <li>SQL Server Agent (SQLEXPRESS) - Stopped</li>
  <li>SQL Server Browser - Running</li>
  </ul>
  
  <p>After try start SQL Server Agent i get this error:</p>
  
  <blockquote>
    <p>The SQL Server Agent (SQLEXPRESS) service on Local Computer started
    and then stopped. Some services stop automatically if they are not in
    use by other services or programs.</p>
  </blockquote>
  
  <p>Thank you for any advice.</p>
  
  <h2>EDIT</h2>
  
  <p>I capture a screen of sql services:
  <a href="https://i.stack.imgur.com/0L5LN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0L5LN.png" alt="enter image description here"></a></p>