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

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
AKRRKA
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

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

Post by AKRRKA » Tue 26 Nov 2013 12:31

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

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

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

Post by MariiaI » Wed 27 Nov 2013 10:36

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.

AKRRKA
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

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

Post by AKRRKA » Wed 27 Nov 2013 13:20

With options "Pooling=False" all Ok.

Thanks.

Post Reply