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

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

Postby 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
AKRRKA
 
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia

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

Postby 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.
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

Postby AKRRKA » Wed 27 Nov 2013 13:20

With options "Pooling=False" all Ok.

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


Return to LinqConnect (LINQ to SQL support)