mysql檔案匯入總結

2021-06-09 12:23:08 字數 1859 閱讀 6589

1. 執行dir /s /w 得到此目錄的檔名,只有檔名

2. notepad 正則替換^ $得到如下

load data infile  'd:/_263_201110180000_201110190000.csv' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

load data infile  'd:/_263_201110190000_201110200000.csv' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

load data infile  'd:/_264_201110180000_201110190000.csv' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

load data infile  'd:/_264_201110190000_201110200000.csv' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

load data infile  'd:/_265_201110180000_201110190000.csv' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

load data infile  'd:/_265_201110190000_201110200000.csv' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

load data infile  'd:/_266_201110180000_201110190000.csv' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

load data infile  'd:/_266_201110190000_201110200000.csv' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

load data infile  'd:/_267_201110180000_201110190000.csv' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

load data infile  'd:/_267_201110190000_201110200000.csv ' into table testtable   fields terminated by ',' enclosed by '"' lines terminated by '\n'  ignore 1 lines ;

3. load data infile  和load data  local infile 區別是檔案乙個在服務端乙個在客戶端

mysql 檔案匯入方法總結

資料匯入3三種方法 限制大小 2m 1.建立資料庫 2.匯入.sql或.sql.zip檔案 大資料匯入方法一 大資料匯入方法二 參考文件 開啟php配置檔案 php.ini 查詢 upload max filesize 和 post max size 把他們的值修改的大一點 如果上傳的檔案很大,還需...

txt檔案匯入mysql

load data low priority concurrent local infile file name replace ignore into tabletbl name character setcharset name terminated by string optionally e...

Mysql 匯入csv檔案

mysql load data infile命令可以把csv平面檔案中的資料匯入到資料庫中。linux下 load data infile home test dump ip location.csv into table ip location character set utf8 fields ...