title: Can't connect to MYSQL server which hosted in google instance
body: <p>I got a google cloud platform - compute engine instance, which I installed MySQL server on.</p>
  
  <p>And now I can't get any signal of life our of the VM the sql installed on,
  for exsample:</p>
  
  <pre><code>package com.company;
  
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.SQLException;
  
  public class Main {
  
  public static void connection(){
      try {
          Class.forName("com.mysql.jdbc.Driver");
          System.out.println("in conncection");
      } catch (ClassNotFoundException e) {
          e.printStackTrace();
      }
  }
  
  public static void connectToMySQL(){
      connection();
      String host = "jdbc:mysql://hotsIP:3306/DBname";
      String user = "user";
      String pass = "password";
      try {
          Connection connection = DriverManager.getConnection(host,user,pass);
          System.out.println("???");
      } catch (SQLException e) {
          e.printStackTrace();
      }
  }
  
  public static void main(String[] args) {
      connectToMySQL();
  }
  }
  </code></pre>
  
  <p>It's take a few second like he trying to connect and the EXEPTION</p>
  
  <pre><code>in conncection
  com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
  </code></pre>
  
  <p>What I done to make it work:</p>
  
  <ul>
  <li>in the my.conf:<code>bind address = 0.0.0.0</code>, <code>skip-external-locking comment out</code></li>
  <li>restart the server </li>
  <li>looked if the server is active</li>
  <li>looked if the server listening to the port</li>
  <li>looked if its TCP</li>
  </ul>
  
  <p>I don't know what to do anymore.</p>