title: ERROR 1698 (28000): Access denied for user 'root'@'localhost'
body: <p>I'm setting up a new server and keep running into this problem.</p>
  <p>When I try to log into the MySQL database with the root user, I get the error:</p>
  <blockquote>
  <p>ERROR 1698 (28000): Access denied for user 'root'@'localhost'</p>
  </blockquote>
  <p>It doesn't matter if I connect through the terminal (SSH), through <a href="https://en.wikipedia.org/wiki/PhpMyAdmin" rel="noreferrer">phpMyAdmin</a> or a MySQL client, e.g., <a href="https://en.wikipedia.org/wiki/Navicat" rel="noreferrer">Navicat</a>. They all fail.</p>
  <p>I looked in the <em>mysql.user</em> table and get the following:</p>
  <pre class="lang-none prettyprint-override"><code>+------------------+-------------------+
  | user             | host              |
  +------------------+-------------------+
  | root             | %                 |
  | root             | 127.0.0.1         |
  | amavisd          | localhost         |
  | debian-sys-maint | localhost         |
  | iredadmin        | localhost         |
  | iredapd          | localhost         |
  | mysql.sys        | localhost         |
  | phpmyadmin       | localhost         |
  | root             | localhost         |
  | roundcube        | localhost         |
  | vmail            | localhost         |
  | vmailadmin       | localhost         |
  | amavisd          | test4.folkmann.it |
  | iredadmin        | test4.folkmann.it |
  | iredapd          | test4.folkmann.it |
  | roundcube        | test4.folkmann.it |
  | vmail            | test4.folkmann.it |
  | vmailadmin       | test4.folkmann.it |
  +------------------+-------------------+
  </code></pre>
  <p>As you can see, user <em>root</em> should have access.</p>
  <p>The Server is quite simple, as I have tried to troubleshoot this for a while now.</p>
  <p>It's running <a href="https://en.wikipedia.org/wiki/Ubuntu_version_history#Ubuntu_16.04_LTS_.28Xenial_Xerus.29" rel="noreferrer">Ubuntu 16.04.1</a> LTS (Xenial Xerus) with Apache, MySQL and PHP, so that it can host websites, and iRedMail 0.9.5-1, so that it can host mail.</p>
  <p>Log into the MySQL database works fine before I installed iRedMail. I also tried just installing iRedMail, but then root also doesn't work.</p>
  <p>How can I fix my MySQL login problem or how can I install iRedMail over an existing MySQL install? And yes, I tried the <a href="https://code.google.com/archive/p/iredmail/wikis/Installation_Tips.wiki" rel="noreferrer">Installation Tips</a> and I can't find those variables in the configuration files.</p>