title: Malformed packet error during MySQL LOAD DATA LOCAL INFILE
body: <p>I am trying to load a file into an MySQL(v5.1.38) innodb table using PHP's <a href="http://ca.php.net/manual/en/mysqli.query.php" rel="nofollow noreferrer">mysqli::query</a> and a <a href="http://dev.mysql.com/doc/refman/5.1/en/load-data.html" rel="nofollow noreferrer">LOAD DATA LOCAL INFILE</a> query.  The query returns a 'Malformed packet' error code 2027. Any ideas what is wrong?</p>
  
  <p>Here is the target table:</p>
  
  <pre><code>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;
  </code></pre>
  
  <p>Here is the query:</p>
  
  <pre><code>LOAD DATA LOCAL INFILE '/path/to/file.txt'
      INTO TABLE lee_datareceive
      FIELDS TERMINATED BY '\t';
  </code></pre>
  
  <p>Here is the file data. Values are tab separated:</p>
  
  <pre><code>t1  t2  t3
  a   b   c
  d   e   f
  g   h   i
  </code></pre>