title: creating stored procedure in ubuntu terminal
body: <p>I am trying to create stored procedures in mysql. I am doing it on terminal (ubunutu).
  But when I am adding <code>;</code> before <code>end</code> it executes all lines and throw an error .
  I am trying to write     </p>
  
  <pre><code>  create procedure test()
  -&gt; begin
  -&gt; select * from salary;
  </code></pre>
  
  <p>I am unable to add <code>end</code> in last and it executeds and got this error  </p>
  
  <blockquote>
    <p>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right
    syntax to use near '' at line 3.</p>
  </blockquote>
  
  <p>Is this a right way to write stored procedure in terminal ?</p>
  
  <p>Can I write stored procedure on separate file?</p>
  
  <p>Then how can I execute that stored procedure written in file ?</p>