var mysql = require('mysql');
var client = mysql.createClient({
user: 'myusername',
password: 'mypassword',
});
client.query('USE mydb');
A simple setup like this using node's mysql is returning an ECONNREFUSED error, although the credentials are correct and permissions are updated. I have even used a different node module to successfully connect/query the database using the same credentials, but the syntax of this module is in my opinion far superior.
Anyone have an idea whats causing this to go wrong?
Error:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: connect ECONNREFUSED