Can't connect to local MySQL server

When trying to launch my new Rails site I get the following error:
“Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”

My database.yml looks like this:
adapter: mysql
database: pixelateur_production
username: <my_username_here>
password: <my_password_here>

What am I doing wrong? Can somebody help me out here?

Problem solved, had the wrong environment.rb file uploaded… Sorry.

I’m curious what you did to resolve this. I’m having the same issue.

Then double check your software configuration and ensure you have specified the correct hostname associated with your database. If an mysql client doesn’t connect by IP it will try to connect using a different method (local socket) as a backup - and DreamHost only supports connecting by IP.

:cool: -//- One-time [color=#6600CC]$50.00 discount[/color] on [color=#0000CC]DreamHost[/color] plans: Use ATROPOS7

I had this problem, and then I realised that your MySQL Hostname CANNOT be localhost. The Hostname is created during the Database creation, and is normally by default.