Hi,
I am starting new on rails.
Tried my first example got this error
#28000Access denied for user ‘root’@‘localhost’ (using password: NO)
Please do suggest as I am having this problem on one of my system but it
works fine on the other.Really confused.
Thanks
Rohan
Alex Y. wrote:
rohan dey wrote:
works fine on the other.Really confused.
What does your database.yml look like? At a guess, I’d say that you
haven’t got a password defined in it, and the database on one system
doesn’t need one, but the other does.
Thanks for the reply, please do look at this file
MySQL (default setup). Versions 4.1 and 5.0 are recommended.
Install the MySQL driver:
gem install mysql
On MacOS X:
gem install mysql – --include=/usr/local/lib
On Windows:
There is no gem for Windows. Install mysql.so from RubyForApache.
And be sure to use new-style password hashing:
development:
adapter: mysql
database: todo
username: root
password:root
host: localhost
Warning: The database defined as ‘test’ will be erased and
re-generated from your development database when you run ‘rake’.
Do not set this db to the same as development or production.
test:
adapter: mysql
database: Todo_test
username: root
password:
host: localhost
production:
adapter: mysql
database: Todo_production
username: root
password:
host: localhost