title: MySQL connection string refused connection
body: <p>I have installed MySQL Community server on local machine and am trying to access it from .NET Core API. Something must be wrong with either the connection string or the server configurations. I have checked the server configs to make sure TCP/IP connections are allowed, checked the connection string according to tutorials but still fail to connect, getting this exception in code:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>Tried connecting to MSSQL database and there are no issues, so nothing else could be wrong from code-side apart from the connection string itself.
  The connection string:</p>
  
  <pre><code>"SqlConnectionString": "Server=127.0.0.1;Uid=admin;Pwd=admin;Database=sys;"
  </code></pre>
  
  <p>SQL query in code (using Dapper):</p>
  
  <pre><code>private const string SQL_INSERT_ENTITY = @"
          INSERT INTO [sys].[adminportal_restapi] (Id, FeatureName, IsEnabled, LastInsertUpdate)
          VALUES (@Id, @FeatureName, @IsEnabled, @LastInsertUpdate)
          ";
  </code></pre>
  
  <p>Database layout:
  <a href="https://i.stack.imgur.com/AGXWp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AGXWp.jpg" alt="MySQL localhost"></a></p>