title: Grant Access to a MySQL user by batch-file
body: <p>I have trying to make <code>GRANT ACCESS</code> to a MySQL Server user.</p>
  
  <p>I have wrote following command in <code>mybatch.bat</code> :</p>
  
  <pre><code>@echo off
  
  cd /
  c:
  
  set mysql_cmd = "GRANT ALL PRIVILEGES ON mydatabase.* TO 'myuser'@'192.168.1.%' IDENTIFIED BY '123abc' WITH GRANT OPTION;"
  
  mysql --user=root --password=mysql --database=mysql -e %mysql_cmd%
  
  pause
  </code></pre>
  
  <p><code>mybatch.bat</code> Output is :</p>
  
  <pre><code>mysql: option '-e' requires an argument
  </code></pre>
  
  <p>What am i doing wrong?</p>