title: Yes, Another MySql: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
body: <p>So I'm not sure what caused this to scramble my MySql password (upgrade to Mountain Lion, reinstalling ruby/rails (other issues), or simply just bad luck) but here we are:</p>
  
  <p>Logging in to mysql is fine, but I can't log into the root    </p>
  
  <pre><code>Ayman$ mysql
  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 96
  Server version: 5.5.25 MySQL Community Server (GPL)
  
  Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  
  Oracle is a registered trademark of Oracle Corporation and/or its
  affiliates. Other names may be trademarks of their respective
  owners.
  
  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  </code></pre>
  
  <p>When I try to login to root:</p>
  
  <pre><code>Ayman$ mysql -u root -p
  Enter password: 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  </code></pre>
  
  <p>Looked at the users:</p>
  
  <pre><code>mysql&gt; CREATE USER root@localhost IDENTIFIED BY 'out22out';
  ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s)     for this operation
  mysql&gt; SELECT USER(),CURRENT_USER();
  +-----------------+----------------+
  | USER()          | CURRENT_USER() |
  +-----------------+----------------+
  | Ayman@localhost | @localhost     |
  +-----------------+----------------+
  1 row in set (0.00 sec)
  
  mysql&gt; SELECT USER, HOST FROM mysql.user;
  ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user'
  mysql&gt; select user, host from mysql.user;
  ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user'
  mysql&gt; grant all on *.* to Ayman@'%';
  ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: NO)
  mysql&gt; 
  </code></pre>
  
  <p>I've tried reinstalling MySql (not sure how to uninstall it), stopping the server instance and restarting it, and every other suggestion on the myriad of similar questions to the right. I've been on this for 3 days now and it's killing me.</p>
  
  <p>Any clue? </p>