Error in LOAD DATA LOCAL of MySQL

1

I'm using LOAD DATA LOCAL INFILE , to fill a table and to try it I use a text like this:

kffokwofkwf  "hostname"
ksakosak "IP" kdosko
_ "mac_eth"____
______ "mac_wifi"_

Which I have in my table 5 fields:

(ID AUTOINCREMENT, HOSTNAME,IP.MAC_ETH_,MAC WIFI)

When doing the LOAD DATA LOCAL INFILE , it keeps everything in the different fields, that is, it seems that it does not recognize the ENCLOSED BY '"'

Someone who can guide me?

My code is as follows:

load data local infile '/listado1.txt'
into table computadora 
FIELDS  ENCLOSED BY '"' TERMINATED BY '\n'
LINES TERMINATED BY '\n'  (HOSTNAME,IP,mac_eth,mac_wifi) ;
    
asked by Aurelio 11.06.2016 в 23:55
source

1 answer

0

What I notice is that your field delimiter is the same as your record delimiter ...

In your case the algorithm, in the first line you will find the record delimiter and conclude that there is insufficient data to fill the row of the table in the database.

    
answered by 13.06.2016 в 15:51