title: Import CSV file into MySQL using phpMyAdmin
body: <p>I have searched and read many posts/articles regarding importing a CSV file into a MySQL database using <code>phpMyAdmin 2.8.0.1</code> and they make it sound so simple, in actually it is not. Nothing I do works correctly.</p>
  
  <p>I have a table with 2 columns, both defined as <code>NOT NULL</code>. The primary index is configured to use both columns. I have many CSV files to import but I'm starting with the small ones first. Here is a sample of my CSV data file:</p>
  
  <pre><code>type    description
  T   Antarctic Territory
  T   Dependency
  T   Independent State
  T   Proto Dependency
  T   Proto Independent State
  </code></pre>
  
  <p>There are only 17 rows to import but usually I get 0 rows inserted and sometimes I get 1 row inserted but it is in the wrong format. What I mean is that column 1 is blank and column 2 contains the data of both columns, in the wrong order. This is the SQL generated by my import attempt:</p>
  
  <pre><code>LOAD DATA LOCAL INFILE '/var/php_sessions/uploads/phpiptDPV' REPLACE INTO TABLE `country_types`
  FIELDS TERMINATED BY '\t'
  LINES TERMINATED BY '\r\n'
  IGNORE 1
  LINES (
  `type` ,
  `description`
  )# MySQL returned an empty result set (i.e. zero rows).
  </code></pre>
  
  <p>Can anyone see where I'm going wrong?  I've spent a few days researching and trying different things but I'm ready to throw out phpMyAdmin.</p>