使用的是最新版本:mysql-connector-net-6.2.3
在执行大SQL的时候报错如下:经查  connection.ConnectionTimeout 该属性是只值的。因此无法设置成0.那位高手遇到过此问题?

解决方案 »

  1.   

    在MYSQL服务器上检查一下这些设置。
    mysql> show variables like '%timeout%';
    +----------------------------+-------+
    | Variable_name              | Value |
    +----------------------------+-------+
    | connect_timeout            | 10    |
    | delayed_insert_timeout     | 300   |
    | innodb_lock_wait_timeout   | 50    |
    | innodb_rollback_on_timeout | OFF   |
    | interactive_timeout        | 28800 |
    | net_read_timeout           | 30    |
    | net_write_timeout          | 60    |
    | slave_net_timeout          | 3600  |
    | table_lock_wait_timeout    | 50    |
    | wait_timeout               | 28800 |
    +----------------------------+-------+
    10 rows in set (0.00 sec)mysql>
      

  2.   


    我觉得以这个设置无关。因为当用linux下执行php脚本时可以运行30分钟不超时