I am trying to connect to my local mysql server from my console, but whenever I try to open a connection it gives me a file not found exception. The connection string should be correct.
MySqlConnectionStringBuilder cstring = new MySqlConnectionStringBuilder();
cstring.UserID = "root";
cstring.Password = "MyPassword";
cstring.Database = "MyDatabase";
cstring.Server = "localhost";
cstring.Port = 3306;
MySqlConnection connect = new MySqlConnection(cstring.GetConnectionString(true));
connect.Open(); //Here I get a file not found exception
Exact error message: Could not load file or assembly 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
EDIT: The server has .NET Connector installed