node.js – handling TCP socket error ECONNREFUSED

I ran the following code: var net = require(‘net’); var client = net.connect(5558, ‘localhost’, function() { console.log(“bla”); }); client.on(‘error’, function(ex) { console.log(“handled error”); console.log(ex); }); As I do not have 5558 open, the output was: $ node test.js handled error { [Error: connect ECONNREFUSED] code: ‘ECONNREFUSED’, errno: ‘ECONNREFUSED’, syscall: ‘connect’ } This proves that the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)