session/connection server variable

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
dpbouchard
Posts: 1
Joined: Fri 15 Mar 2013 20:19

session/connection server variable

Post by dpbouchard » Wed 21 Jun 2017 13:30

How do I set a session/connection level server variable in the mysqlconnectionstringbuilder?

I want to set net_read_timeout from its default of 30 to say 900.

Thanks,
Don Bouchard

Pinturiccio
Devart Team
Posts: 2138
Joined: Wed 02 Nov 2011 09:44

Re: session/connection server variable

Post by Pinturiccio » Fri 23 Jun 2017 12:52

The default command timeout of MySqlCommand is 30 second. For more information, please refer to https://www.devart.com/dotconnect/mysql ... meout.html

You can set a larger value for this property to avoid the "Lost connection to MySQL server during query" error.

You can also specify a larger value of the 'Default Command Timeout' parameter in the connection string. In this case, for all MySqlCommands that use this connection, the CommandTimeout property value will be equal to the one you have specified in the connection string by default.
For more information, please refer to:
http://www.devart.com/dotconnect/mysql/ ... tring.html
http://www.devart.com/dotconnect/mysql/ ... meout.html

Post Reply