1 . mysql.exe 客户端load data infile 可以
mysql> LOAD DATA INFILE "F:/备份/new/a.c
sv"-> INTO TABLE table2 FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TE
RMINATED BY '\n' IGNORE 1 LINES ;
2. 代码中和sqlyog工具都失败,提示如下:
Error Code : 29
File 'F:\备份\new\a.csv' not found (Errcode: 2)
(0 ms taken)
3. 采用相对路径就可以了
LOAD DATA INFILE '../temp/a.csv'
INTO TABLE table2 FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES ;
当前目录为C:\Users\bruce\Desktop\mysql-5.5.27-win32\mysql-5.5.27-win32\数据库目录