mysql导入错误1148,将CSV导入MySQL表会返回错误#1148

我选择不使用LOAD DATA的CSV时尝试使用DirectAdmin导入-我收到错误消息“第1行CSV输入中的无效字段计数”.

当我尝试使用LOAD DATA时,出现以下错误:“#1148-此MySQL版本不允许使用的命令.”

CSV是从MS Access数据库在MS Access中创建的.

这是前两行:

"product_id","vendor_id"," product_parent_id","product_sku","product_s_desc ","product_desc","product_thumb_image ","product_full_image","product_publish","product_weight","product_weight_uom ","product_length ","product_width","product_height ","product_lwh_uom ","disp_order","price","sale","product_url ","product_in_stock","product_available_date","product_availability ","product_special ","product_discount_id ","ship_code_id ","cdate ","mdate ","product_name ","product_sales ","attribute ","custom_attribute ","product_tax_id ","product_unit ","product_packaging ","child_options ","quantity_options ","child_option_ids ","product_order_levels "

41,2,0,1,,,"resized/Krug-Rose-Champagne-lg.jpg","Krug-Rose-Champagne-lg.jpg","Y","750.0000","grams","4.0000","4.0000",14,,14,3516,0,,,1296518400,,"N",0,"NULL ",1296574622,1297953843,"קרוג רוזה",0,,,2,"piece ",65537,"N,N,N,N,N,Y,20%,10%, ","none,0,0,1 ",,"0,0 "

解决方法:

从mysql命令行传递以下参数:

mysql -u username -p dbname --local-infile

代替使用:加载数据infile,而使用:加载数据本地infile,它应该执行导入.

默认情况下,mysql不按照此处定义的安全性考虑启用本地加载数据:

If LOAD DATA LOCAL is disabled, either in the server or the client, a

client that attempts to issue such a statement receives the following

error message:

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

标签:csv,import,mysql

来源: https://codeday.me/bug/20191023/1913280.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值