Skip to content

Module does not work in Node.js 0.6 (was: ECONNREFUSED) #718

Closed
@EgidioCaprino

Description

@EgidioCaprino

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions