希望您正在使用LOAD DATA INFILE
。
尝试使用LOAD DATA LOCAL INFILE
代替LOAD DATA INFILE
。
可能是其他问题,请访问以下链接:MySQL LOAD DATA。
当您登录MySQL时,请执行以下操作,
abdul@xmpp3:~/Desktop/Jiva$ mysql -uroot -p --local-infile
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 257
Server version: 5.5.29-0ubuntu0.12.04.1-log (Ubuntu)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use mydb;
mysql> LOAD DATA LOCAL INFILE '/home/abdul/Desktop/STATISTIC_T.csv' INTO TABLE STATISTIC_T FIELDS TERMINATED BY '|' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES;
现在使用载入CSV ,出于安全原因,在载入新的MySQL版本之前LOAD DATA LOCAL INFILE
,我们需要使用。--local-infile
CSV