title: Unable to log into mysql as root on OpenWRT
body: <p>I finally decided to post my question as I am encountering high difficulties to connect to the mysql client.</p>
  
  <p>I am using a mySQL database on an OpenWRT OS installed on an Arduino Yun.</p>
  
  <p>I cannot log into mySQL as root, the following error message is displayed:</p>
  
  <blockquote>
    <p>ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
    password: NO)</p>
  </blockquote>
  
  <p>I tried with suffix -u root (or -uroot) and suffix -p and a supposed password but every time it turns out to be the same error, sometimes with (using password: NO), other times with (using password: YES)</p>
  
  <p>Reading some posts, I tried all the following manipulation :</p>
  
  <p>kill mysqld and then run </p>
  
  <blockquote>
    <p>mysqld with --skip-grant-tables</p>
  </blockquote>
  
  <p>It works and I can log into mysql but any operation proposed to UPDATE the password for user root turns a QUERY OK with 0 rows modified. It should be normal I suppose, as I am not log with grant tables I have no access to user informations and privileges.</p>
  
  <p>Note that when I run </p>
  
  <blockquote>
    <p>SELECT user();</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>SELECT current_user();</p>
  </blockquote>
  
  <p>I get root@ with nothing following.</p>
  
  <p>Re-installing the databases using the script mysql_install_db. It does not work as is saying that no host "Arduino" or "localhost"could be looked up with /usr/bin/resolveip (nota: no such thing in that folder)
  using the --force option it works.</p>
  
  <p>I tried what is exposed in the following post <a href="https://stackoverflow.com/questions/34589871/solved-mysql-cant-log-in-access-denied-brand-new-installation-openwrt">SOLVED - MySQL - Can&#39;t Log In - Access Denied - Brand New Installation (OpenWRT)</a></p>
  
  <p>With the command line </p>
  
  <blockquote>
    <p>mysqladmin -uroot password pwd</p>
  </blockquote>
  
  <p>I ended with the same answer :</p>
  
  <blockquote>
    <p>error: 'Access denied for user 'root'@'localhost' (using password:
    NO)'</p>
  </blockquote>
  
  <p>Could anybody help me or tell me what is the cleanest way to uninstall and fully reinstall MySQL on OpenWRT?</p>
  
  <p>Thank you</p>