title: MySQL Access denied error
body: <p>I am trying to install mySQL on a Mac OS 10.8 and set up a user account. 
  NOTE I am a abs beginner when it comes to using the command line in Terminal window.</p>
  
  <p>I used these instructions to install:
  <a href="http://www.macminivault.com/mysql-mountain-lion/" rel="nofollow noreferrer">http://www.macminivault.com/mysql-mountain-lion/</a></p>
  
  <p>I set my own password for all users here:</p>
  
  <pre><code> GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY 'mypass' WITH GRANT OPTION;
  quit
  </code></pre>
  
  <p>Every time i try to execute mySQL as a root user on the command line i get this:</p>
  
  <pre><code>Ciarans-MacBook-Pro:~ callanmooneys$ mysql -u root
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>I read around on the net and tried various things  including tried this to change password:</p>
  
  <pre><code>mysqladmin -u root -pyourcurrentmysqlrootpassword password yournewmysqlrootpassword,
  it returns -&gt; 
      -&gt; USE mysql
      -&gt; 
  </code></pre>
  
  <p>If i simply type 'mysql' and launch the mySQL monitor then try to crete a user account:</p>
  
  <pre><code>mysql&gt; USE mysql
  ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
  mysql&gt; 
  </code></pre>
  
  <p>Also tried answers on forum: <a href="https://stackoverflow.com/questions/5547288/access-is-denied-for-user-rootlocalhost-mysql-error-1045?rq=1">access is denied for user &#39;root&#39;@localhost mysql error 1045</a> returned 'root@127.0.0.1 command not found</p>
  
  <p>And <a href="https://stackoverflow.com/questions/489119/mysql-error-1045-access-denied?rq=1">MySQL - ERROR 1045 - Access denied</a>:</p>
  
  <pre><code>Ciarans-MacBook-Pro:~ callanmooneys$ mysqld_safe --skip-grant-tables
  131105 21:44:41 mysqld_safe Logging to '/usr/local/mysql/data/Ciarans-MacBook-Pro.local.err'.
  131105 21:44:41 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
  /usr/local/mysql/bin/mysqld_safe: line 129: /usr/local/mysql/data/Ciarans-MacBook-Pro.local.err: Permission denied
  /usr/local/mysql/bin/mysqld_safe: line 166: /usr/local/mysql/data/Ciarans-MacBook-Pro.local.err: Permission denied
  131105 21:44:41 mysqld_safe mysqld from pid file /usr/local/mysql/data/Ciarans-MacBook-Pro.local.pid ended
  /usr/local/mysql/bin/mysqld_safe: line 129: /usr/local/mysql/data/Ciarans-MacBook-Pro.local.err: Permission denied
  Ciarans-MacBook-Pro:~ callanmooneys$ mysql -u root
  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
  Ciarans-MacBook-Pro:~ callanmooneys$
  </code></pre>
  
  <p>Feedback appreciated.</p>