title: How to import data from a text file into a specific MySQL column?
body: <p>I am consolidating various lists (text files) and spreadsheets by putting all the information into a MySQL database. In many cases, I simply need to import the entire contents of a TXT file into a specific column in MySQL.</p>
  
  <p>My project is basically a dictionary. For example, I have a table that is called allWords. This column contains every word that could appear. On my local hard drive, I have a text file with all of these words. How do I get all of those words into my table?</p>
  
  <p>I realize that there are several workarounds (using Excel, for example) that I could employ, but I would like to do this the "right" way, since this is only the beginning of many similar tasks.</p>
  
  <p>I have tried a number of queries, all along the lines of this:</p>
  
  <pre><code>LOAD DATA LOCAL INFILE  '/home/mysite/tmp/phpb8Lp3L' REPLACE INTO TABLE  `words` 
  FIELDS TERMINATED BY  ';'
  ENCLOSED BY  '"'
  ESCAPED BY  '\\'
  LINES TERMINATED BY  '\r\n'
  IGNORE 1 
  LINES # 60780 rows affected.
  </code></pre>
  
  <p>Is there no way to import directly into a COLUMN (as opposed to into a TABLE)? Should I look into a script to help me do this?</p>
  
  <p>Thanks in advance for any help!</p>