title: Mysql works with sudo, but without not. (ubuntu 16.04, mysql 5.7.12-0ubuntu1.1)
body: <p>I have <code>Ubuntu 16.04</code>, and <code>Mysql 5.7.12-0ubuntu1.1</code>. When I type:</p>
  
  <pre><code>sudo mysql -u root
  </code></pre>
  
  <p>I can login into mysql console, but when I type it without <code>sudo</code>:</p>
  
  <pre><code>mysql -u root
  </code></pre>
  
  <p>I obtain error: </p>
  
  <pre><code>ERROR 1698 (28000): Access denied for user 'root'@'localhost'
  </code></pre>
  
  <p>My problem occurred when I installed and removed <code>MariaDB</code>. I remember that in <code>PostgreSQL</code> there is important which unix user login to database, but how to handle with this in <code>Mysql</code>?</p>
  
  <hr>
  
  <p>I solved this problem following by:</p>
  
  <blockquote>
    <p><a href="https://askubuntu.com/questions/766334/cant-login-as-mysql-user-root-from-normal-user-account-in-ubuntu-16-04">https://askubuntu.com/questions/766334/cant-login-as-mysql-user-root-from-normal-user-account-in-ubuntu-16-04</a></p>
  </blockquote>