session/connection server variable

session/connection server variable

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

Don Bouchard
Posts: 1
Joined: Fri 15 Mar 2013 20:19

Re: session/connection server variable

Postby Pinturiccio » Fri 23 Jun 2017 12:52

The default command timeout of MySqlCommand is 30 second. For more information, please refer to

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:
Devart Team
Posts: 2085
Joined: Wed 02 Nov 2011 09:44

Return to dotConnect for MySQL