Ruby on Rails on MySql

A couple of small problems. For the first one, a fix from LaughingMeme. When I tried to set up my first scaffold, I got a message complaining about

No such file or directory - /tmp/mysql.sock

I needed to edit config/database.yml to change the host to (or, equivalently, localhost.localdomain).

The second error was easier:

Access denied for user 'root'@'localhost.localdomain' (using password: NO)

I just had to specify my own username in database.yml instead of leaving the field empty. (I expected it to default to my username but for some reason it wanted to default to root.)