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)

原文地址:https://www.cnblogs.com/wangjiale1024/p/11330431.html

时间: 2024-08-30 02:19:56

LOAD CSV ERROR: The used command is not allowed with this MySQL version的相关文章

MySQL ERROR : The used command is not allowed with this MySQL version 解决办法

目的:向MySql数据库导入.txt文件,通过load命令来实现 输入如下命令,报错: 修改命令,依旧报错: 可能原因(from mysql reference manual): If LOAD DATA LOCALis disabled, either in the server or the client, a client that attempts to issue such a statement receives the fol-lowing error message: ERROR

【mysql】 load local data infield 报错 ERROR 1148 (42000): The used command is not allowed with this MySQL version

mysql> load data local infile '/Users/flint/learn/mysql/pet' into table bx_pet; 执行报错 ERROR 1148 (42000): The used command is not allowed with this MySQL version 解决办法: 在连接数据库的时候使用 mysql --local-infile -uroot -p 连接即可 原文地址:https://www.cnblogs.com/china-

R语言连接MySQL报错:could not run statement: The used command is not allowed with this MySQL version

版本说明 R版本:3.5 MySQL版本:8.0 RMySQL版本:0.10.19 情景说明: 使用RMySQL成功连接到MySQL数据库,可以进行查询操作,但在插入时报错,提示信息如下: con <- dbConnect(MySQL(), host="127.0.0.1", dbname="epid", user="root", password="1234")dbWriteTable(con,"city_d

虚拟机中MySQL连接问题:Lost connection to MySQL server at &#39;reading initial communication packet, system error: 0 以及 host is not allowed to connect mysql

环境:在VirtualBox中安装了Ubuntu虚拟机,网络使用了NAT模式,开启了端口转发. 局域网内其他计算机访问虚拟机中的MySQL Server出现两个问题: Lost connection to MySQL server at 'reading initial communication packet, system error: 0 以及 host is not allowed to connect mysql 1.解决Lost connection to MySQL server

CSHOP后台设置SMTP发邮件提示 Error: need RCPT command 错误解决

其实错误原因并不是因为此错误,经检测,邮件服务器返回的真实错误是 501 mail from address must be same as authorization user .只因为同时返回了 503 Error: need MAIL command 和 503 Error: need RCPT command ,而ECSHOP只提示了最后一行错误. <br>220 smtp.qq.com Esmtp QQ Mail Server<br>250-smtp.qq.com250-

“command line option syntax error,Type command/?for help

VS2010安装WDT时出现"command line option syntax error,Type command/?for help错误 解决:可能是因为你的安装源文件所在的路径中有中文,所以你可将安装文件放在一个没有中文的路径. "command line option syntax error,Type command/?for help,布布扣,bubuko.com

Fatal error encountered during command execution

MySQL + .net + EF 开发环境,调用一处sql语句报错: Fatal error encountered during command execution[sql] view plain copy print?SELECT @r AS cateid,(SELECT @r := b.ParentId FROM cmscontentcategory b WHERE b.id = cateid) AS parentid FROM (SELECT @r := '75422ccd151c48

window下rocketmq启动报Load JVM error

启动mqnamesrv总是报,Load JVM error D:\Program Files (x86)\Java\jdk1.6.0_13/jre/bin/server/jvm.dll,我JDK检查几次没有问题 后在开发群里询问网友,JDK必须使用64位解决掉了. 启动mqnamesrv start/b bin/mqnamesrv.exe  >mqnamesrv.log 启动broker start/b bin/mqbroker.exe -n "127.0.0.1:9876"&g

【ECshop错误集锦】解决ECShop发送邮件提示:Error: need RCPT command

ECShop发送邮件报错Error: need RCPT command,经检测,邮件服务器返回的真实错误是501 mail from address must be same as authorization user .只因为同时返回了503 Error: need MAIL command 和 503 Error: need RCPT command ,而ECSHOP只提示了最后一行错误.问题出在提供邮件服务商那边!对方机器不支持邮件包含!特别是QQ邮箱. 很多用户以为是程序问题,其实不然