title: Run sql script using batch file from command prompt
body: <pre><code>D:
  cd Tools/MySQL5/bin
  mysql -u root mysql
  use xyz;
  source C:/Users/abc/Desktop/xyz.sql;
  \q
  </code></pre>
  
  <p>When I run the above lines in command prompt it works fine but when I save it as a batch file and run the file it connects to mysql but doesn't perform the sql scripts.</p>