title: MySQL - Error 1045, access denied
body: <p><strong>EDIT</strong>: Fixed it by creating <code>'fakaff'@'localhost'</code>.</p>
  
  <hr>
  
  <p>First time using MySQL, using latest MAMP installation. Following the tutorial, I started by creating a database: </p>
  
  <pre><code>CREATE publications; USE publications;
  </code></pre>
  
  <p>Next, I created a user. I tried both variations but both give me <code>ERROR 1045</code>:</p>
  
  <pre><code>GRANT ALL ON publications.* TO 'fakaff' IDENTIFIED BY '12345';
  </code></pre>
  
  <p>and</p>
  
  <pre><code>GRANT ALL ON publications.* TO 'fakaff@localhost' IDENTIFIED BY '12345'; 
  //edit: clearly I screwed up the syntax here so it didn't work. 
  </code></pre>
  
  <p>When I try to log in and enter my password, I get this message:</p>
  
  <pre><code>/Applications/MAMP/Library/bin/mysqp -u fakaff -p
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>ERROR 1045 (28000): Access denied for user 'fakaff'@'localhost' (using password: YES)
  </code></pre>
  
  <hr>
  
  <p>Any idea what's causing the error? I've not played with any settings or entered any commands other than the ones I listed. </p>