(Newbie) Database (MySQL) config pb

Hello there,

Beginning to read the Agile Web D. With Rails book.

I have a strange pb with database configuration. I have configured
user/password in the database.yml file, and that seems to please the
scaffold generating script, but in order to get the application
running, it seems that I must have a [email protected] Mysql user without
any password. If not I have an “Access denied…” message.

I can’t find where to modify this (and I’m not comfortable with a
root/(void)) account…

Some hints ?


Linux Debian/Sarge
MySQL 4.1.11
lighttpd-1.4.13 (using FastCGI)
Ruby version 1.8.2 (i386-linux)
RubyGems version 0.9.0
Rails version 1.1.6
Active Record version 1.14.4
Action Pack version 1.12.5
Action Web Service version 1.1.6
Action Mailer version 1.2.5
Active Support version 1.3.1
Application root /my/path/to/depot
Environment development
Database adapter mysql

This is probably obvious, but it’s good to start at the very beginning.
In your database.yml file, under development, it should look something
like this:

adapter: mysql
database: depot_development
username: brycem
password: secret
host: localhost

this is the hash for the depot app and a WebBrick server running under
development mode. It could be that you’re inadvertently running in
production in test mode which would then produce the error you’re
getting. Also, make sure the name of your database (depot_development)
matches up.

I know this is rudimentry, but I made a lot of obvious errors when I
first began the Agile Web book.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs