Port #3306 is always used regardless to a port number specified in config
Just as I say: no matter which port you specify in config. The module always connects to the port #3306.
Are you passing a string for the port property, or does typeof port === 'number'?
var c = new Client({ host: 'localhost', user: 'foo', password: 'bar', port: 3308 });
I have MySQL running on port #3306 and MariaDB on port #3308. So I've got weird errors when trying to connect. Turning on logging in MariaDB showed that no connection attempts to port #3308 were detected.
It works for me, I even double-checked with strace. I'm not sure why you're having an issue.... Are you using the latest version of mariasql?