我使用python连接到一个mysql数据库con = _mysql.connect('localhost', 'dell-pc', '', 'test')
我写的程序需要花费大量时间才能完全执行,即大约10个小时.实际上,我试图从语料库中读出不同的词.阅读完成后出现超时错误.
我检查了Mysql的默认超时时间:
+----------------------------+----------+
| Variable_name | Value |
+----------------------------+----------+
| connect_timeout | 10 |
| delayed_insert_timeout | 300 |
| innodb_lock_wait_timeout | 50 |
| innodb_rollback_on_timeout | OFF |
| interactive_timeout | 28800 |
| lock_wait_timeout | 31536000 |
| net_read_timeout | 30 |
| net_write_timeout | 60 |
| slave_net_timeout | 3600 |
| wait_timeout | 28800 |
+----------------------------+----------+
Run Code Online (Sandbox Code Playgroud)
如何更改默认超时?