Malformed packet error during MySQL LOAD DATA LOCAL INFILE
Posted
by dnagirl
on Stack Overflow
See other posts from Stack Overflow
or by dnagirl
Published on 2010-03-10T20:02:03Z
Indexed on
2010/05/30
18:32 UTC
Read the original article
Hit count: 483
I am trying to load a file into an MySQL(v5.1.38) innodb table using PHP's mysqli::query and a LOAD DATA LOCAL INFILE query. The query returns a 'Malformed packet' error code 2027. Any ideas what is wrong?
Here is the target table:
CREATE TABLE `zbroom`.`lee_datareceive` (
`a` varchar(45) NOT NULL,
`b` varchar(45) NOT NULL,
`c` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Here is the query:
LOAD DATA LOCAL INFILE '/path/to/file.txt'
INTO TABLE lee_datareceive
FIELDS TERMINATED BY '\t';
Here is the file data. Values are tab separated:
t1 t2 t3
a b c
d e f
g h i
© Stack Overflow or respective owner