Raviprakash Raviprakash - 2 years ago 209
SQL Question

How to set timeout in mysql c++ connector

I am using c++ connector to connect to MySQL server. When server is offline or in sleep,the statement execute method takes a while to detect the connection problem.

Is there a method or variable to control the waiting timeout period in client?


Devara Gudda

Answer Source

You can use the mysql_options function to set the client timeout. Full details here... http://dev.mysql.com/doc/refman/5.0/en/mysql-options.html

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download