Forum: Ruby on Rails Mysql::Error in RecipeController#new

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Alexandre A. (Guest)
on 2006-05-15 13:57
Hi,

I'm doing the following tutorial
:http://www.onlamp.com/pub/a/onlamp/2005/01/20/rail...
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
Jon Evans (Guest)
on 2006-05-15 14:03
(Received via mailing list)
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
Erik van Oosten (Guest)
on 2006-05-15 14:16
(Received via mailing list)
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/
Alexandre A. (Guest)
on 2006-05-15 15:07
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
This topic is locked and can not be replied to.