title: can't get mysql module to work with node js
body: <p>I am compleeeeetly new to Node js and wanted to start my very first project to get used to it. I am using the excess framework.</p>
  
  <p>I found some nice mysql module which was easily downloaded and installed. The module is correctly placed in the modules folder.</p>
  
  <p>I tried to call it in my app.js file like that:</p>
  
  <pre><code>...
  var mysql = require('mysql');
  ...
  var connection = mysql.createConnection({
    host     : 'localhost',
    user     : 'root',
    password : '27sparks&amp;&amp;55',
    database : 'react'
  });
  connection.connect();
  app.locals.mysql = connection;
  
  connection.query('SELECT * FROM comment', function(err, rows, fields) {
    if (err) throw err;
    console.log(rows);
  });
  
  connection.end();
  </code></pre>
  
  <p>When I try to run the www in the /bin directory with this command : <code>node www</code> to start my localhost project I now get following error in the terminal:</p>
  
  <p>/Applications/XAMPP/xamppfiles/htdocs/nodeschool/learn/app.js:79
    if (err) throw err;
             ^</p>
  
  <pre><code>Error: connect ECONNREFUSED 127.0.0.1:3306
      at Object.exports._errnoException (util.js:837:11)
      at exports._exceptionWithHostPort (util.js:860:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)
      --------------------
      at Protocol._enqueue (/Applications/XAMPP/xamppfiles/htdocs/nodeschool/learn/node_modules/mysql/lib/protocol/Protocol.js:135:48)
      at Protocol.handshake (/Applications/XAMPP/xamppfiles/htdocs/nodeschool/learn/node_modules/mysql/lib/protocol/Protocol.js:52:41)
      at Connection.connect (/Applications/XAMPP/xamppfiles/htdocs/nodeschool/learn/node_modules/mysql/lib/Connection.js:123:18)
      at Object.&lt;anonymous&gt; (/Applications/XAMPP/xamppfiles/htdocs/nodeschool/learn/app.js:75:12)
      at Module._compile (module.js:434:26)
      at Object.Module._extensions..js (module.js:452:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Module.require (module.js:365:17)
      at require (module.js:384:17)
  </code></pre>