title: MySQL LOAD DATA INFILE - Loading a file with no primary key
body: <p>I was trying to load a data file into mysql table using "LOAD DATA LOCAL INFILE 'filename' INTO TABLE 'tablename'". </p>
  
  <p>The problem is the source data file contains data of every fields but the primary key is missing ('id' column). I have to add a unique id to each line of source data file otherwise the import will not go through.</p>
  
  <p>Is there an option to ignore primary key in source file or auto increase it during the import?</p>
  
  <p>It's already been set to a auto-increment primary key.</p>
  
  <pre><code>mysql&gt; desc tablename;
  +--------------------+--------------+------+-----+---------+----------------+
  | Field              | Type         | Null | Key | Default | Extra          |
  +--------------------+--------------+------+-----+---------+----------------+
  | id                 | int(11)      | NO   | PRI | NULL    | auto_increment | 
  ...
  </code></pre>