Load a csv file to full MySQL

0

I'm trying to upload .csv files to MySQL, but when uploading the file does not load the complete records, for example from a file that contains 100 records only uploads 85. I would like to know if this error is some configuration on the server or something is wrong with the files. The instruction I use to upload the file is as follows:

LOAD DATA
LOCAL INFILE 'RUTA DEL ARCHIVO'
INTO TABLE PRUEBA
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\N'
IGNORE 1 LINES;
    
asked by Rafa FE 20.04.2017 в 19:46
source

2 answers

2

test as follows:

LOAD DATA
INFILE 'RUTA DEL ARCHIVO'
INTO TABLE PRUEBA
COLUMNS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 LINES;
    
answered by 20.04.2017 в 21:19
0

Try this web: link

From a csv file it detects data types and returns a mysql script that creates the table.

    
answered by 04.05.2017 в 00:59