LOAD CSV ERROR: The used command is not allowed with this MySQL version

Posted wangjiale1024

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LOAD CSV ERROR: The used command is not allowed with this MySQL version相关的知识,希望对你有一定的参考价值。

要执行的sql

把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端 local_infile 都设置为True/ON

# 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的主要内容,如果未能解决你的问题,请参考以下文章

LOAD DATA LOCAL INFILE 给出错误 The used command is not allowed with this MySQL version

google浏览器chrome The certificate used to load uses

[Vue] Lazy Load a Route by using the Dynamic Import in Vue.js

1 IntelliSense: #error 指令: Please use the /MD switch for _AFXDLL builds

IntelliSense: #error 指令: Please use the /MD switch for _AFXDLL builds

mysql load本地文件失败,提示access denied