title: Host 'XXX' is not allowed to connect to this MySQL server (V.8)
body: <p>When trying to connect to MySQL running on a local network I'm getting the error message:</p>
  
  <pre><code>Host 'XXX' is not allowed to connect to this MySQL server.
  </code></pre>
  
  <h1>Disclaimer (MySQL Ver 8)</h1>
  
  <p>The answers provided bellow do not solve te problem in MySQL <strong>v8</strong></p>
  
  <p><a href="https://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server">Host &#39;xxx.xx.xxx.xxx&#39; is not allowed to connect to this MySQL server</a></p>
  
  <p><a href="https://stackoverflow.com/questions/15087492/host-localhost-is-not-allowed-to-connect-to-this-mysql-server-1130">host &#39;localhost&#39; is not allowed to connect to this MySQL server (#1130)</a></p>
  
  <p>The solution provided in these old answers are returning the following error in MySQL Ver 8.0.13.</p>
  
  <pre><code>GRANT ALL PRIVILEGES ON mysql.* TO root@localhost IDENTIFIED BY 'pass123' WITH GRANT OPTION;
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>Grant All Privileges ON *.* to 'root'@'%' Identified By 'pass123'; 
  </code></pre>
  
  <p>Output message:</p>
  
  <blockquote>
    <p>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 'IDENTIFIED BY 'pass123' WITH GRANT OPTION' at line
    1</p>
  </blockquote>