title: Batch file to create a user and then assign permissions with mysql
body: <p>I am trying to create a batch file to create a new user and then assign permissions to the new user.  I want to do something like this:</p>
  
  <pre><code>c:\mysql\bin\mysql -uroot -ppassword &lt; CREATE USER 'username_here'@'localhost' IDENTIFIED BY 'password_here';
  c:\mysql\bin\mysql -uroot -ppassword &lt; GRANT ALL ON myDB.* TO 'username_here'@'localhost';
  </code></pre>
  
  <p>Problem is I get an error saying the System can not find the file specified.  I know I am calling the mysql exe from the right place because if I just do:</p>
  
  <pre><code>c:\mysql\bin\mysql -uroot -ppassword
  </code></pre>
  
  <p>it logs in and gives me the mysql prompt.  Am I doing something wrong?</p>