当前位置:Gxlcms > 数据库问题 > mysql 导入出csv

mysql 导入出csv

时间:2021-07-01 10:21:17 帮助过:37人阅读

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

标签:state   参数   line   允许   add   ike   exec   mysq   csv   

人气教程排行