Closed
Description
Hello.
I'm trying to connect to MySQL server in this way.
var config = require('./config.js'),
mysql = require('./node_modules/mysql/index.js'),
csv = require('./node_modules/csv/index.js'),
fs = require('fs');
console.log(config.db);
var db = mysql.createConnection(config.db);
db.connect();
but I get this error:
{ [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
fatal: true }
I tried all the solution on the web but nothing worked.