title: Can't connect to local mysql database
body: <p>I am trying to connect to a database I created locally using <strong>MySQL Workbench</strong>. I was able to add the database to my <strong>Server Explorer</strong>, and when I test the connection I get a 'successful' message. I can expand the drop down menus and see the table 'Items' I created as well as any information stored in the table.</p>
  
  <p>When I try to use the following:</p>
  
  <pre><code>using (SqlConnection connection = new SqlConnection("server=localhost;user id=root;persistsecurityinfo=True;database=gpbuddy"))
  {
   connection.Open(); // Failure here
   Console.WriteLine(connection.State);
  }
  </code></pre>
  
  <p>The connection string that I have here is from clicking my database: 'gpbuddy' and copying the 'connection string' from the properties section.</p>
  
  <p>I also tried this connection string</p>
  
  <pre><code>"server=localhost;user id=root;password=mypass;persistsecurityinfo=True;database=gpbuddy"
  </code></pre>
  
  <p>I also tried to create a new db user named admin:</p>
  
  <pre><code>"server=localhost;user id=admin;password=mypass;persistsecurityinfo=True;database=gpbuddy"
  </code></pre>
  
  <p>I get the following error: </p>
  
  <pre><code>System.Data.SqlClient.SqlException: 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) ---&gt; System.ComponentModel.Win32Exception: The network path was not found
     --- End of inner exception stack trace ---
     at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)
     at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
     at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
     at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
     at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
     at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)
     at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)
     at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp; connection)
     at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
     at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
     at System.Data.SqlClient.SqlConnection.Open()
     at GEScanner.Tools.Database.testDbConnection() in C:\Users\Acina\Documents\Visual Studio 2017\Projects\GEScanner\GEScanner\Tools\Database.cs:line 28
  ClientConnectionId:00000000-0000-0000-0000-000000000000
  Error Number:53,State:0,Class:20
  </code></pre>
  
  <p>BTW: I am using .NET Core 2.0, I am using the following reference in my .csproj
  <code>&lt;PackageReference Include="System.Data.SqlClient" Version="4.4.0" /&gt;</code></p>
  
  <p>Edit: Did a quick test on a normal c# console application with the same code and same error, so I don't believe .NET Core is the issue here. Definitely something to do with creating the database through MySQL Workbench.</p>