Page 1 of 1

LinqConnect Professional Version 4.4.374 (14-Nov-2013) - Connect to MySQL with old password

Posted: Tue 26 Nov 2013 12:31
by AKRRKA
Hello,

Any new issue.

1) Connect to MySQL by example with user "ceadmin" and password "1";
2) Disconnect, dispose context and assign to null:

Code: Select all

DataContext.Connection.Close();
DataContext.Dispose();
DataContext = null;
3) Change password on server for "ceadmin" from "1" to "2";
4) And we can connect to database with old "1" and new password "2";
5) After restart application, with old password can`t connect.

Example project: WindowsFormsApplication14.zip (848.1 КБ) - http://rghost.ru/50459853

Re: LinqConnect Professional Version 4.4.374 (14-Nov-2013) - Connect to MySQL with old password

Posted: Wed 27 Nov 2013 10:36
by MariiaI
This is an expected behavior and it is related to the connection pooling. After you have changed the authentication parameters, they will be applied for new connections only, while already opened sessions do not need to re-authenticate.
To avoid this situation, you can disable connection pooling(Pooling=False in the connection string) or clean pool(please refer here or here).

dotConnect for MySQL (LinqConnect) uses connection pooling. If Pooling=true (the default value), a connection is not deleted after closing it, it is placed to the pool instead. When a new connection with the same connection string is opened, it is taken from the pool (if there are free connections) instead of creating a new one. This provides significant performance improvements.
In case Pooling=false, a connection will be deleted from memory and free the session. However this may lead to performance loss.

Re: LinqConnect Professional Version 4.4.374 (14-Nov-2013) - Connect to MySQL with old password

Posted: Wed 27 Nov 2013 13:20
by AKRRKA
With options "Pooling=False" all Ok.

Thanks.