Mysql::Error in RecipeController#new


#1

Hi,

I’m doing the following tutorial
:http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=3
but when I’m trying to access the database I get the following error

#28000Access denied for user ‘root’@‘localhost’ (using password: NO)

That’s strange because the database.yml file is defined with a password
:

development:
adapter: mysql
database: cookbook
username: root
password: xxxx
host: localhost

test:
adapter: mysql
database: cookbook
username: root
password: xxxx
host: localhost

production:
adapter: mysql
database: cookbook
username: root
password: xxxx
host: localhost

Any idea ? Thanks


#2

Hi,

On 15 May 2006, at 10:57, Alexandre AJ wrote:

#28000Access denied for user ‘root’@‘localhost’ (using password: NO)

That’s strange because the database.yml file is defined with a
password

Did you restart after changing your database.yml?

Jon


#3

Don’t use the same database name for test and development/production!
You will loose all your data as soon as you run a test.
Can’t help you with your question, sorry.

Erik.

Alexandre AJ schreef:

username: root
Any idea ? Thanks


Erik van Oosten


#4

Erik van Oosten wrote:

Don’t use the same database name for test and development/production!
You will loose all your data as soon as you run a test.
Can’t help you with your question, sorry.

Erik.

Alexandre AJ schreef:

username: root
Any idea ? Thanks


Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/

I missed to restart now it’s working fine thanks