Skip to content Skip to sidebar Skip to footer

Mysql "network-related Or Instance-specific Error Occurred While Establishing A Connection To Sql Server"

I've been looking around for a solution to this issue and the only one that might provide a solution is the only one I haven't tried, because it involves changing system properties

Solution 1:

SqlConnection is for SqlServer. To connect to MySql you need to download some drivers and reference it in your project, and use MySqlConnection instead.

Take a look at this question and this CodeProject sample.

Solution 2:

As @JW Lim and @Kirk Woll suggested, the issue was caused by the use of the System.Data.SqlClient, which is used alongside SQLServer.

For this project, seeing as I am keeping it local, the use of MySql.Data.MySqlClient is the correct way to approach this.

Post a Comment for "Mysql "network-related Or Instance-specific Error Occurred While Establishing A Connection To Sql Server""