title: MySQL 5.7.20 can't set a root password
body: <p>After a fresh mysql 5.7 installation i have a problem with root pw.</p>
  
  <p>I'm trying start mysql with <code>mysqld_safe --skip-grant-tables &amp;</code> and go in to mysql <code>mysql -u root</code></p>
  
  <p>And try to set a password with</p>
  
  <pre><code>root@localhost [(none)]&gt; flush privileges;
  Query OK, 0 rows affected (0.00 sec)
  
  root@localhost [(none)]&gt; ALTER USER 'root@localhost' IDENTIFIED BY 'password';
  </code></pre>
  
  <p>And im getting this error;</p>
  
  <pre><code>ERROR 1396 (HY000): Operation ALTER USER failed for 'root@localhost'@'%'
  </code></pre>
  
  <p>I tried this way too;</p>
  
  <pre><code>root@localhost [mysql]&gt; update user set authentication_string=password('password') where user='root';
  Query OK, 0 rows affected, 1 (0.00 sec)
  Rows matched: 0  Changed: 0  Warnings: 1
  </code></pre>
  
  <p>Both not working please help..</p>