Can't grant all privileges to root in MySQL 5.7. Syntax error
<p>This one is really baffling. I hope I'm not doing something stupid, but it just doesn't make sense. I installed a fresh MySQL 5.7 on Ubuntu, logged in locally to mysql as root and ran the following:</p>

<pre><code>CREATE USER 'root'@'%' IDENTIFIED BY 'password';
</code></pre>

<p>Success!</p>

<p>Next, I ran this:</p>

<pre><code>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
</code></pre>

<p>No bueno. This resulted in the following error:</p>

<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 '*.* TO 'root'@'%' WITH GRANT OPTION' at line 1
</code></pre>

<p>WTF? I've been running that command on MySQL servers for 2 years. Why didn't it work? As any good little developer would do, I decided to RTM. Here's the example given in the 5.7 manual (<a href="http://dev.mysql.com/doc/refman/5.7/en/adding-users.html" rel="nofollow noreferrer">http://dev.mysql.com/doc/refman/5.7/en/adding-users.html</a>):</p>

<pre><code>mysql&gt; GRANT ALL PRIVILEGES ON *.* TO 'finley'@'%'
-&gt;     WITH GRANT OPTION;
</code></pre>

<p>Am I taking crazy pills? Except for the username, that's exactly what I did. This should just work, right??? There's a baffling lack of other people on the Internet reporting this problem, so I assume I must just be glossing over something obvious, but I'm 2 hours deep into this and just plain can't figure it out. Thanks in advance.</p>