Failed to connect to localhost:1433 - connect ECONNREFUSED 127.0.0.1:1433
<p>I'm trying to connect to my local MySql server from node.js/express application using <code>mssql</code> with following config:</p>

<pre><code>// Database connection
var sql = require('mssql');
var config = {
    user: 'db_user',
    password: 'db_pass',
    server: 'localhost',
    database: 'project_db'
};
sql.connect(config, function (err) {
    if (err) {
        console.log(err);
    }
});
</code></pre>

<p>I get this error:</p>

<pre><code>{ [ConnectionError: Failed to connect to localhost:1433 - connect ECONNREFUSED 127.0.0.1:1433]
  name: 'ConnectionError',
  message: 'Failed to connect to localhost:1433 - connect ECONNREFUSED 127.0.0.1:1433',
  code: 'ESOCKET' }
</code></pre>

<p>I know I have to enable TCP/IP connections for my local MySql server, but I can not find how to do it on OSX El Capitan. There is nothing like control panel with settings. That's all available at System Preferences > MySql:
<a href="https://i.stack.imgur.com/vp5nV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vp5nV.png" alt="enter image description here"></a>
Any ideas how to fix this, guys? Thanks for trying to help.</p>