title: Node.js MySQL database connection - time out (ETIMEDOUT)
body: <p>I try to make a simple connection to an online mysql database on a node.js server. This is my code: </p>
  
  <pre><code>var mysql = require('mysql');
  
  var con = mysql.createConnection({
      host: 'example.org',
      username: 'myusername',
      password: 'mypassword'
  });
  
  con.connect(function(err) {
      if (err) throw err;
      console.log("Connected!");
  });
  </code></pre>
  
  <p>Whenever I run this server I get the error:
  "connect ETIMEDOUT".</p>
  
  <p>I am a 100% sure my credentials are correct and I also changed the privileges of the user in phpmyadmin (I gave this user all possible privileges).  </p>
  
  <p>I run the server locally, I am not sure if this has anything to do with it.</p>
  
  <p>My questions are: 
  - Why is it timing out?
  - And how can I connect to this database? </p>