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
Manually defining the socket fixed this problem for me.
var client = mysql.createClient({ user: '(your user here)', password: '(your password here)', host: '127.0.0.1', port: '3306', _socket: '/var/run/mysqld/mysqld.sock', });