title: Updating data in mysql db from bash script
body: <p>It's my first time trying to insert some info in a mysql database with an executable .sh file.</p>
  
  <p>I'm using the following bash script but it's not working. Obviously most of the vars below have been replaced and simplified for ease of understanding.</p>
  
  <pre><code>#!/bin/bash
  
  mysql -D mydbname -u mydbuser -p mydbpass &lt;&lt;EOF
  INSERT INTO mytable (mycolumn) VALUES ('myvalue') WHERE id = '13';
  
  exit;
  </code></pre>
  
  <p>You can see that I only want to insert my value in the row where id = 13 and this row does exist.</p>
  
  <p>I don't think i'm formatting the query properly am I?</p>
  
  <p>EDIT : Ok after suggestions below i've now got this but it still doesn't work?</p>
  
  <pre><code>#!/bin/bash
  mysql -D mydbname -u mydbuser -p mydbpass &lt;&lt;EOF
  UPDATE mytable SET mycolumn = 'myvalue' WHERE id = '13';
  exit;
  </code></pre>