Page 1 of 1

session/connection server variable

Posted: Wed 21 Jun 2017 13:30
by dpbouchard
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

Re: session/connection server variable

Posted: Fri 23 Jun 2017 12:52
by Pinturiccio
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