title: MySQL fails on: mysql "ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded"
body: <p>My local environment is:</p>
  
  <ul>
  <li>fresh Ubuntu 16.04</li>
  <li>with PHP 7</li>
  <li><p>with installed MySQL 5.7</p>
  
  <pre><code>sudo apt-get install mysql-common mysql-server
  </code></pre></li>
  </ul>
  
  <hr>
  
  <p>When I tried to login to MySQL (via CLI):</p>
  
  <pre><code>mysql -u root -p
  </code></pre>
  
  <p>I came across an cyclic issue with 3 steps.</p>
  
  <h2>1) First was some socket issue</h2>
  
  <pre><code>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
  </code></pre>
  
  <p><strong>Solution: restarting PC.</strong></p>
  
  <p>Which led to another error:</p>
  
  <h2>2) With access denied</h2>
  
  <pre><code>ERROR 1698 (28000): Access denied for user 'root'@'localhost'.
  </code></pre>
  
  <p>Possible issue? Wrong password for "root" user!</p>
  
  <p><strong>Solution: <a href="https://support.rackspace.com/how-to/mysql-resetting-a-lost-mysql-root-password/">reset root password with this tutorial</a>.</strong></p>
  
  <p>With correct password and working socket, there comes last error.</p>
  
  <h2>3) Incorrect auth plugin</h2>
  
  <pre><code>mysql "ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded"
  </code></pre>
  
  <p>Here I stopped or somehow got to 1) again.</p>