首页 > 数据库技术 > 详细

mysql 导入出csv

时间:2018-12-24 20:16:53      阅读:139      评论:0      收藏:0      [点我收藏+]

load data infile ‘/var/lib/mysql-files/ip_address.csv‘ into table ip_address fields terminated by ‘,‘ optionally enclosed by ‘"‘ escaped by ‘"‘ lines terminated by ‘\n‘;

 

报错:ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

mysql中执行 show variables like ‘%secure%‘;  -- 查看secure-file-priv 这个参数只允许导入导出文件的位置,默认为/var/lib/mysql-files/如果要导入的文件不在这个里面就报以上错误;

 

mysql 导入出csv

原文:https://www.cnblogs.com/aaron-agu/p/10170680.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!