title: change password of mysql in Centos 6.5
body: <p>I installed mysql as follows :</p>
  
  <pre><code>sudo yum install mysql-server
  </code></pre>
  
  <p>I installed mysql-server on cents 6.5 which did not give me any password
  so when I use it as </p>
  
  <p>I try to follow these steps</p>
  
  <p>1) sudo service mysqld stop
  2) sudo mysqld_safe --skip-grant-tables &amp;
  3) mysql -uroot</p>
  
  <p>4) user mysql;</p>
  
  <p><strong>The error is Error 1049 (42000) unknown database mysql;</strong> </p>
  
  <p>4)UPDATE user SET Password=PASSWORD('NewPassHere') WHERE User='root';
  or 
  update user set password=PASSWORD("mynewpassword") where User='root';</p>
  
  <p>4.2) FLUSH PRIVILEGES;
  4.3) quit;
  5) sudo service mysqld restart</p>