How to set timeout in mysql c++ connector

前端 未结 1 428
情深已故
情深已故 2021-01-21 08:06

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 ther

相关标签:
1条回答
  • 2021-01-21 08:56

    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

    0 讨论(0)
提交回复
热议问题