Database.yml in rails


#1

Hi,

I get the following error when creating a scaffold:

Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)


My database.yml has the following: (HOW DO I FIX THIS?)

development:
adapter: mysql
database: vlab_development
hostname: vlab-development-db.vlab.gorerle.com
username: vlab_dev_db
password: vlab_pass
#socket: /path/to/your/mysql.sock

Connect on a TCP socket. If omitted, the adapter will connect on the

domain socket given by socket instead.

#host: localhost
#port: 3306


Gordon Erlebacher
School of Computational Science
Florida State University
Tallahassee, Florida


#2

I answered my own question. I replaced hostname by host and the problem was solved.

Gordon Erlebacher
School of Computational Science
Florida State University
Tallahassee, Florida