mysql 導入出csv

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';mysql

 

報錯:ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statementsql

mysql中執行 show variables like '%secure%';  -- 查看secure-file-priv 這個參數只容許導入導出文件的位置,默認爲/var/lib/mysql-files/若是要導入的文件不在這個裏面就報以上錯誤;this

相關文章
相關標籤/搜索