Mysql update table using ubuntu terminal
MySQL has built-in support for importing data from CSV files, just use the command-line client :


  mysql -u &lt;user&gt; -p


(replace &lt;user&gt; with your MySQL username and enter the password when asked to)

Then, tell MySQL to use your database :


  USE &lt;database&gt;;


(replace &lt;database&gt; with the database name)

And finally, use this to import everything from your CSV file :


  LOAD DATA INFILE '&lt;path&gt;' INTO TABLE &lt;table&gt;;


(replace &lt;path&gt; with the full path to the CSV file such as /home/user/file.csv and &lt;table&gt; with the table name).

Look at this question and this one that may be related to your question.