title: creating user in mysql using java
body: <p>In <strong>MySQL</strong> command line client after logging in as root, I typed:</p>
  
  <pre><code>connect mydb;
  grant all privileges on mydb.* to 'admin'@'localhost' identified by 'pass';
  </code></pre>
  
  <p>Now within <strong>Java</strong>,
  I succesfully connect to the db using the admin userid using drivers.</p>
  
  <pre><code> Statement put=connect.createStatement();
  
   //**WORKS succesfully**
   put.execute("insert into mydb.emp values(100,joe)");   
  
   //**does NOT work**
   put.execute("grant all privileges on mydb.* to 'john'@'localhost' identified by 'pass'"); 
  </code></pre>
  
  <p>Why does an insert command work but grant command never work through Java?</p>
  
  <p>Please help.</p>