Home > Blockchain >  InvalidOperationException When connecting to mySQL database in C#
InvalidOperationException When connecting to mySQL database in C#

Time:11-06

I'm currently using .NET Framework 4.8 and I can't seem to get into my database. The password and other connection info has been tested elsewhere and is valid, so does anyone know why I continue to get this exception? System.InvalidOperationException:'Internal connection fatal error.' When I run the following simple code?

using System.Data.SqlClient;
             SqlConnection conn = new SqlConnection("...");

conn.Open();
conn.Close();

I'm just trying to get into the database, not even query yet... Any help would be greatly appriciated.

CodePudding user response:

System.Data.SqlClient is the SQL Server driver. You need the MySql driver, which is available on NuGet.

  • Related