{"issue":{"created_at":"2011-11-25T13:39:19Z","state":"closed","updated_at":"2011-11-26T12:15:53Z","comments":2,"user":{"gravatar_id":"16dc265276fe4bcb8347b7488bce8cb9","id":272535,"url":"https://api.github.com/users/dadepo","login":"dadepo","avatar_url":"https://secure.gravatar.com/avatar/16dc265276fe4bcb8347b7488bce8cb9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I am trying to work with Node and Mysql on my Ec2 instance but i keep encountering error when trying to connect with the Database.\r\n\r\nvar _mysql = require('mysql');\r\n\r\nvar MYSQL_USER = 'root';\r\nvar MYSQL_PASS = '**********';\r\nvar DATABASE = 'adas';\r\nvar TABLE = 'ep';\r\n\r\nvar mysql = _mysql.createClient({\r\nuser: MYSQL_USER,\r\npassword: MYSQL_PASS,\r\n});\r\n\r\n\r\nmysql.query('use' + DATABASE, function(err) {\r\n  if (err) {\r\n    throw err;\r\n  }\r\n  });\r\n\r\nAnd i keep getting the following Error\r\n---------------------------------------\r\n\r\nnode.js:201\r\n        throw e; // process.nextTick error, or 'error' event on first tick\r\n              ^\r\nError: connect ECONNREFUSED\r\n    at errnoException (net.js:614:11)\r\n    at Object.afterConnect [as oncomplete] (net.js:605:18)\r\n\r\nAny idea what might be wrong?\r\nYour Assistance would be appreciated.\r\n","assignee":null,"id":2349396,"number":144,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Error: connect ECONNREFUSED ON Database Query","closed_at":"2011-11-26T12:15:53Z","html_url":"https://github.com/felixge/node-mysql/issues/144","milestone":null,"url":"https://api.github.com/repos/felixge/node-mysql/issues/144"},"action":"closed"}