title: Catching mysql output in shell script
body: <p>I am new to shell scripting. I am trying to write a shell script in which i can run mysql commands after reading from the file. I have to capture the output of the sql commands in a separate file. Following is the code :</p>
  
  <pre><code>mysql -h ${DB_SERVER} -P ${DB_PORT} -u ${USER} -p${PASS} -f &lt; createUsers.sql &gt;&gt; install.log
  </code></pre>
  
  <p>Shell script takes a few inputs from the user.
  When i run the shell script and if i specify a wrong password, the error shows up on the console but not in the log file.</p>
  
  <p>Please suggest how can i redirect the error to the log file as well.</p>