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:
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.
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:
"SqlConnectionString": "Server=127.0.0.1;Uid=admin;Pwd=admin;Database=sys;"
SQL query in code (using Dapper):
private const string SQL_INSERT_ENTITY = @"
INSERT INTO [sys].[adminportal_restapi] (Id, FeatureName, IsEnabled, LastInsertUpdate)
VALUES (@Id, @FeatureName, @IsEnabled, @LastInsertUpdate)
";
