title: Importing data from csv to mariaDB missing first column
body: <p>I have a .csv file with 4 columns. I'm having trouble inputting the first column into the table. Here is the script:</p>
  
  <pre><code>#!/bin/bash
  
  _csvfile="/logstash/Mysql-Data.csv"
  
  #Create the tables if they dont exists
  
  
  mysql -u user -ppassword logstash &lt;&lt; eof
    CREATE TABLE IF NOT EXISTS \`elkDevIndexAssoc\` (
      cenDevSID varchar(255),
      cenDevFQDN varchar(255),
      cenDevIP varchar(255),
      cenDevServiceName varchar(255)
    )
  eof
  
  
  #Format the csv, replace ";" with ","
  sed -i -e 's/;/,/g' $_csvfile
  #sed -i -e 's/^/,/g' $_csvfile
  IFS=, 
  while read column1 column2 column3 column4 
    do 
      echo "INSERT INTO elkDevIndexAssoc (cenDevSID,cenDevFQDN,cenDevIP,cenDevServiceName) VALUES ('$column1', '$column2', '$column3', '$column4');" 
  
  done &lt; Mysql-Data.csv | mysql --user='user' --password='password' -D logstash;
  </code></pre>
  
  <p>The output looks fine if i echo each column variable, e.g $column1 - 4. Like this:</p>
  
  <pre><code>123213 serverfqdn 127.0.0.1 mysql
  </code></pre>
  
  <p>But when i then try to import it to mysql, the first column is missing, like this:</p>
  
  <pre><code>mysql&gt; select * from elkDevIndexAssoc;
  +-----------+------------------------------------------------+----------------    -+--------------------+
  | column1 | column2                                     | column3            | column4  |
  +-----------+------------------------------------------------+----------------  -+--------------------+
   |column1 | column2                                     | column3         | column4
           |  | serverfqdn            | 127.0.0.1  | mysql
  </code></pre>
  
  <p>I dont understand how the first column is missing when i import it to mysql but not when i echo each variable individually?</p>
  
  <p>EDIT: My .csv file is formatted like this:</p>
  
  <pre><code>S123123,serverfqdn,127.0.0.1,service
  S123123,serverfqdn,127.0.0.1,service
  S123123,serverfqdn,127.0.0.1,service
  S123123,serverfqdn,127.0.0.1,service
  </code></pre>