title: MySQL root access from all hosts
body: <p>I've installed MySQL server on a remote Ubuntu machine. The <code>root</code> user is defined in the <code>mysql.user</code> table this way:</p>
  
  <pre><code>mysql&gt; SELECT host, user, password FROM user WHERE user = 'root';
  +------------------+------+-------------------------------------------+
  | host             | user | password                                  |
  +------------------+------+-------------------------------------------+
  | localhost        | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
  | ip-10-48-110-188 | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
  | 127.0.0.1        | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
  | ::1              | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
  +------------------+------+-------------------------------------------+
  </code></pre>
  
  <p>I can access with user <code>root</code> from the same remote machine command-line interface using the standard <code>mysql</code> client. Now I want to <strong>allow root access from every host on the internet</strong>, so I tried adding following row (it's an exact duplicate of the first row from previous dump, except for the <code>host</code> column):</p>
  
  <pre><code>mysql&gt; SELECT host, user, password FROM user WHERE host = '%';
  +------------------+------+-------------------------------------------+
  | host             | user | password                                  |
  +------------------+------+-------------------------------------------+
  | %                | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
  +------------------+------+-------------------------------------------+
  </code></pre>
  
  <p>But my client on my personal PC continues to tell me (I obscured the server IP):</p>
  
  <blockquote>
    <p>SQL Error (2003): Can't connect to MySQL server on '46.x.x.x' (10061)</p>
  </blockquote>
  
  <p>I can't tell if it's a authentication error or a network error. On the server firewall I enabled port <em>3306/TCP</em> for <em>0.0.0.0/0</em>, and that's ok for me...</p>