title: CSV File to MySQL Database
body: <p>I have a CSV file in the following format:</p>
  
  <p><code>"id","code","date","address","complete_url"</code></p>
  
  <p>Example data from the CSV:</p>
  
  <pre><code>"144003286","ICXT","20100104","NJ","http://www.orhancanceylan.com"
  "144003286","SEED","20100104","NY","http://www.erbileren.com"
  "144003286","ANX","20100104","CA","http://www.foursquareme.com"
  "144003286","AIG","20100104","NJ","http://www.orhancanceylan.com"
  </code></pre>
  
  <p>I want to load all of the data into MySQL. I tried the following command:</p>
  
  <pre><code>LOAD DATA LOCAL INFILE 'C:\\Users\\pb\\Documents/data.csv' 
  INTO TABLE new_table
  FIELDS TERMINATED BY '","' ENCLOSED BY '"'
  LINES TERMINATED BY '\n'
  </code></pre>
  
  <p>And I received the following error:</p>
  
  <pre><code>1265 Data truncated for column 'id' at row 1
   1261 Row 1 doesn't contain data for all columns
   1261 Row 1 doesn't contain data for all columns
   1261 Row 1 doesn't contain data for all columns
   1261 Row 1 doesn't contain data for all columns
   Records: 1  Deleted: 0  Skipped: 0  Warnings: 5    3.620 sec
  </code></pre>
  
  <p>What is wrong with my code or CSV?</p>