title: How to fix ERROR 1064 (42000) syntax error?
body: <p>I change my root password using <code>update user set authentication_string=password("!QAZxsw2") where user="root";</code> this syntax but the error <code>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '("!QAZxsw2") where user="root"' at line 1</code> keeps pop up. I don't know why please help!</p>
  
  <p>I've google this question and most of the articles tell me to use <code>update user set authentication_string=password("!QAZxsw2")where user ="root";</code> this syntax to change my root password. I can't find where did I make it wrong. By the way, I have also tried this code <code>set password for root@localhost = password('!QAZxsw2');</code> However, still get the same result.</p>
  
  <pre class="lang-sql prettyprint-override"><code>mysql&gt; update user set authentication_string=password("!QAZxsw2") where user="root";
  </code></pre>
  
  <pre><code>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '("!QAZxsw2") where user="root"' at line 1
  </code></pre>