Malformed packet error during MySQL LOAD DATA LOCAL INFILE
- by dnagirl
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