I have an application that I had not noticed but the connection does not close
I did a simple example was:
Obj = new MySqlConnection MySqlConnection ();
obj.Host = "machine";
obj.UserId = "root";
obj.Password = "123";
obj.Open ();
obj.Close ();
when I check with "SHOW PROCESSLIST" the connection is still alive, and only close until my application is closed
dotConnect's version is:
Devart.Data.dll = 5.0.93.0
Devart.Data.MySql.dll = 5.80.140.0
any solution that can help me?
regards
Error close conection
Try using the "Pooling=false;" connection string parameter. For more information, please refer to http://www.devart.com/dotconnect/mysql/ ... q.html#q54.
Try using this code:
If this doesn't help, please specify the exact version (x.xx.xx) of your MySQL server.
Code: Select all
MySqlConnection obj = new MySqlConnection();
obj.Host = "machine";
obj.Port = 3306;
obj.UserId = "root";
obj.Password = "123";
obj.ConnectionString += "Pooling=false;";
obj.Open ();
Console.WriteLine("execute SHOW PROCESSLIST at the database side to make sure that connection is alive");
Console.ReadKey();
obj.Close ();
Console.WriteLine("execute SHOW PROCESSLIST at the database side to make sure that connection is killed");
Console.ReadKey();