title: can not connect to mysql by external network ip
body: <p>I'm using CentOS 6.5 64bit AND mysql-server-5.5.43-29.el6.art.x86_64
  External network IP address is 118.192.87.188</p>
  
  <p>first:</p>
  
  <pre><code>vim /etc/sysconfig/iptables
  -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
  :wq
  </code></pre>
  
  <p>second:</p>
  
  <pre><code>yum -y install mysql mysql-server
  /etc/init.d/mysqld start
  chkconfig mysqld on
  cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
  </code></pre>
  
  <p>third:</p>
  
  <pre><code>mysql_secure_installation
      .......
  "Thanks for using MySQL!"
  </code></pre>
  
  <p>forth:</p>
  
  <pre><code>/etc/init.d/mysqld restart
  </code></pre>
  
  <p>fifth:</p>
  
  <pre><code>mysql -uroot -ppasswd -P3306
  mysql&gt;use mysql;
  mysql&gt;select user,host from user;
  mysql&gt;update user set host='%' where user='root';
  mysql&gt;GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'passwd' WITH GRANT OPTION;
  mysql&gt;flush privileges;
  </code></pre>
  
  <p>question:
  I can connect to mysql in this CentOS by using:</p>
  
  <pre><code>mysql -uroot -ppasswd -P3306
  mysql -uroot -ppasswd -hlocalhost -P3306
  mysql -uroot -ppasswd -h127.0.0.1 -P3306
  mysql -uroot -ppasswd -h118.192.87.188 -P3306
  </code></pre>
  
  <p>But in my Ubuntu:</p>
  
  <pre><code>mysql -uroot -ppasswd -h118.192.87.188 -P3306
  </code></pre>
  
  <p>30 seconds later:</p>
  
  <blockquote>
    <p>ERROR 2003 (HY000): Can't connect to MySQL server on '118.192.87.188' (110)</p>
  </blockquote>