title: Resetting MySQL root password when current password is not known
body: <p>I have inherited a server that has mysql installed on it.  I don't have the mysql password for any user, not even root (although I have the linux root password).  Plus, I am only aware of one other user account besdies root, and that one does not have privileges to perform any action, not even SELECT.</p>
  
  <p>I tried stopping the mysql servicw, restarting with the skip grant tables option, and just logging in without password: </p>
  
  <pre><code>service mysqld stop
  service mysqld start --skip-grant-tables &amp;
  mysql -u root
  </code></pre>
  
  <p>But get the following error:</p>
  
  <pre><code>Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>I then tried resetting the password:</p>
  
  <pre><code>mysqladmin -u root password 'newpw'
  </code></pre>
  
  <p>But that also gives an access denied error.</p>
  
  <p>I also tried logging in as the other user (without pw) and executing the following command:</p>
  
  <pre><code>UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
  </code></pre>
  
  <p>and got this error:</p>
  
  <pre><code>ERROR 1142 (42000): UPDATE command denied to user ''@'localhost' for table 'user'
  </code></pre>
  
  <p>I have also tried removing mysql and reinstalling, but I get the same errors.</p>
  
  <p>Any suggestions?</p>