标签:ror row cal pat close sed rmi val local
把csvload进db
LOAD DATA LOCAL INFILE '/path/datas/temp.csv' INTO TABLE test_table_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS;
# server端
mysql> SHOW VARIABLES LIKE '%local%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile | ON |
+---------------+-------+
# 客户端
connect = pymysql.connect(host=host, user=user_name, passwd=password, db=db_name, charset='utf8', local_infile=True)
LOAD CSV ERROR: The used command is not allowed with this MySQL version
标签:ror row cal pat close sed rmi val local
原文地址:https://www.cnblogs.com/wangjiale1024/p/11330431.html