我找到了这个更快的将 csv 文件上传到 mysql 服务器的示例 -->
MySQL localhost osm JS >
util.importTable("/usr/local/mysql/mysql-files/load_data.csv",
{schema: "parallel", table: "parallel_load", columns:
["user_id","visible","name","size","latitude","longitude",
"timestamp","public","description","inserted"],
dialect: "csv-unix", skipRows: 0, showProgress: true,
fieldsOptionallyEnclosed: true, fieldsTerminatedBy: ",",
linesTerminatedBy: "\n",fieldsEnclosedBy: '"',threads: 8,
bytesPerChunk: "1G", maxRate: "2G"})
我想从我有上传数据功能的 .py 文件中执行这个 mysql shell 命令。这怎么可能从 python 运行 mysql shell 命令?我已经安装了mysql shellC:\Program Files\MySQL\MySQL Shell 8.0\bin\mysqlsh.exe .
谢谢。