Hi Everyone,
I developed an application in my system with Ruby, Rails,
WEBrick and MySQL - everything installed in my system.
First, i got this error
“Access denied for user ‘root’@‘localhost’ using password:NO”
But i found a quick fix, by installing MySQL without password and
user name as “root”. And everything went fine.
Now, my problem is - i want to upload my application and host it on
net. But am getting the same error. Dont know how to fix it, i cant
re-install mysql without password (will lead to security issue) or
restart the ‘Apache’ server etc… since i read somewhere that if we
change the “database.yml” file we should restart the Web Server (infact
i was doing this in my system - restarting the WEBrick server)
Please anyone help me hosting my application.
Thanks in advance
Regards,
Vasanth
have u updated the database.yml with u r database name and password?
change it.
Ya i have made all the changes in “database.yml” file…
Still getting the same error 
Hi, is the database and database.yml have the exact same userid and
pass for access?
-Conrad
Try to check whether u given password as NO???
development:
adapter: mysql
database: ubac_webfront_development
username: root
password:
host: localhost
check it to look like as above and then restart your webrick server.
Ya both the database and database.yml have the exact userid and
password…
But i read somewhere that the Webserver should be restarted to take
effect. Here in my case, thats impossible bcaz we have to host the
application somewhere else. They wont restart the “Apache” server for
our purpose… since many application are running there…
If restarting the Webserver is the problem, then can anyone tell me
another way to resolve this??
Ya everything is fine and good…
But still the problem exists 
do i need to restart “Apache” webserver??
Vasanthakumar C. wrote:
Ya everything is fine and good…
But still the problem exists 
do i need to restart “Apache” webserver??
You should be able to just restart your fcgi processes - check out
reaper.rb in the rails scripts directory.
Kiran Soumya wrote:
Try to check whether u given password as NO???
development:
adapter: mysql
database: ubac_webfront_development
username: root
password:
host: localhost
check it to look like as above and then restart your webrick server.
I’m assuming you have the database.yml production settings filled in?
production:
adapter: mysql
database: production_database_name
username: production_user_name
password: production_password
host: localhost
If you are getting the same message are you running your application in
production mode?
You might want to uncomment in the line in config/environment.rb:
ENV[‘RAILS_ENV’] = ‘production’
So it reads
ENV[‘RAILS_ENV’] = ‘production’