title: Yet another "Lost connection to mysql server at 'reading initial communication packet', system error: 0" issue
body: <p>This seems like a duplicate post, but I have checked all the solutions posted in relevant posts and none of them worked for me. So allow me to state the problem more accurately.</p>
  
  <p>I have a server, where MySQL is installed. I have a user X with password P. </p>
  
  <p>If I connect to the server (ssh or something) and try to run MySQL locally (<code>mysql --user=X --password==P</code>) it logs in perfectly, and I have access to everything:</p>
  
  <pre><code>    mysql&gt; show grants;
      ...
      +------------------------------------------------------+
      | GRANT ALL PRIVILEGES ON *.* TO 'X'@'%' IDENTIFIED BY |
      |PASSWORD 'somehash' WITH GRANT OPTION                 |
      +------------------------------------------------------+
  </code></pre>
  
  <p>Now if I go to the config file: (<code>sudo vim /etc/mysql/my.cnf</code>) I see the following:</p>
  
  <pre><code>bind-address = 0.0.0.0
  port = 3306
  </code></pre>
  
  <p>Then I go to hosts allow file (<code>sudo vim /etc/hosts.allow</code>) I see:</p>
  
  <pre><code>mysqld: ALL
  </code></pre>
  
  <p>Then I go to hosts allow file (<code>sudo vim /etc/hosts.deny</code>): the file is empty (except for some comments).</p>
  
  <p>Still, when I try to connect with MySQL workbench I have the problem.
  Here is how I do it. I go to add a new connection, I add the URL, username, pass, and port, and I click test connection and I get the message that is the title of this question. I tried with a random (non-existent) user pass combination and still I get the same response.</p>
  
  <p>I tried commenting out bind-address too BTW. Also the server is generally accessible for other services like PostgreSQL and such.</p>