首页 > 解决方案 > How can I set the options for a MySQL Connector/Python X DevAPI connection?

问题描述

How can I set the "--local-infile[={0|1}]" option for a mysqlx connection?

My python code looks the following:

import mysqlx

# Connect to server on localhost
session = mysqlx.get_session({
    'host': 'localhost',
    'port': 33060,
    'user': 'root',
    'password': '12345678',
})

标签: mysqlmysql-pythonmysql-x-devapi

解决方案


Currently, there is no LOAD DATA support in the X Protocol, which means that X DevAPI clients don't provide such an option. You'll need a Classic Protocol connection for that.

Disclaimer: I'm the lead developer of the MySQL X DevAPI Connector for Node.js


推荐阅读