title: Mysql workbench Error 1044 / 1142: Access / Grant command denied to user ''@'localhost' for
body: <p>I work on a Mac OSX 10.6.8, and I use Mysql Workbench to learn how to handle databases (I'm a beginner as far as databases go). Now, I have created a few users, and I'm trying to toy around with giving these users' rights, and let them interact with each other by granting and revoking each other various rights. </p>
  
  <p>I have logged in via the root user and supposedly given all "toy users" their initial rights by using the necessary grant queries (verified via queries using "show grants"), but then I try to log in as the various users. Let's say two of these users are named "Sofia" and "Martin", and I want Sofia to give Martin the update- and insert-rights to a table "Book". Sofia was given the necessary privileges from my root-login unless I am mistaken, so I write (when logged in as Sofia)</p>
  
  <pre><code>grant update, insert on Book to Martin;
  </code></pre>
  
  <p>This yields the error</p>
  
  <blockquote>
    <p>Error 1142: GRANT command denied to user ''@'localhost' for table
    'book'</p>
  </blockquote>
  
  <p>Further, I try to figure out what rights Sofia <em>does</em> have, and enter the following query</p>
  
  <pre><code>show grants for Sofia;
  </code></pre>
  
  <p>when logged in as Sofia. The response:</p>
  
  <blockquote>
    <p>Error 1044: Access denied to user ''@'localhost' for database 'mysql'</p>
  </blockquote>
  
  <p>What is this mysterious ''@'localhost' user the errors are talking about? What should I do to make things work?</p>