title: MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost'
body: <p>While connecting to mysql through 'root' user, I am getting the mentioned error.
  Commands tried:</p>
  
  <pre><code>mysql (as by default it takes root user)
  mysql -u root -p 
  </code></pre>
  
  <p>I Tried putting the root credentials in "/etc/my.cnf" file, but no luck.</p>
  
  <p>Please help.</p>