查看 _mysql 文档,我发现:
help(_mysql.connection)
class connection(__builtin__.object)
...
load_infile
int, non-zero enables LOAD LOCAL INFILE, zero disables
然后,我尝试创建一个连接,我有:
python> _mysql.connection(host = ..., db = ..., user = ..., passwd = ..., load_infile = 1)
TypeError Traceback (most recent call last)
<ipython-input-23-e3878d45fb4e> in <module>()
----> 1 _mysql.connection(host = ..., db = ..., user = ..., passwd = ..., load_infile = 1)
TypeError: 'load_infile' is an invalid keyword argument for this function
我错过了什么?
供参考:
In [25]: _mysql.version_info
Out[25]: (1, 2, 3, 'final', 0)
In [26]: _mysql.get_client_info()
Out[26]: '6.0.0'