This is a weird problem and I\'m not sure what\'s going on. I installed MySQL on a linux box I have running Ubuntu 10.04 LTS. I can access mysql via SSH mysql -p
mysql -p
You need to set the socketPath
mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'root', password : 'password', socketPath : '/var/run/mysqld/mysqld.sock', });