title: Can't connect to MySQL with Sequelize
body: <p>I consistently get a <code>SequelizeConnectionRefusedError</code> when trying to connect to a MySQL database on my server.</p>
  
  <p>The login credentials are correct, the port is open, everything seems good (and works like a charm in the dev environment).</p>
  
  <p>Sorry for the scarce background information, but I'm dumbfounded here - I really don't know what could be causing this problem.</p>
  
  <p>This is my output from <code>mysql --version</code></p>
  
  <pre><code>mysql  Ver 14.14 Distrib 5.5.43, for debian-linux-gnu (x86_64) using readline 6.3
  </code></pre>
  
  <p>And this is the code I'm using to initialize Sequelize. The table I want it to use doesn't exist yet, but I'm fairly sure that hasn't got anything to do with this problem. I've tried logging in with the root user as well, but no dice - I still get the same error.</p>
  
  <pre><code>var sequelize = new Sequelize("database", username, password, {
      host: "localhost",
      dialect: "mysql",
      port: 3306,
      define: {
          paranoid: true
      }
  });
  
  var Model = sequelize.define("Model", {
      md5: {type: Sequelize.STRING(128)},
      ip: {type: Sequelize.STRING(256)},
      url: {type: Sequelize.STRING(1024)}
  });
  
  sequelize.sync();
  </code></pre>
  
  <p>This is running on Ubuntu 14.04, where node is being run behind Passenger (although the error appears if I run the application with node directly as well). I'm running nginx and PHP on the same server, where another PHP application is connecting to the database, if that's of any relevance.</p>
  
  <p>What could be causing this problem?</p>