Access denied for user 'root'@'localhost' (using password: NO)?

I’m getting this error when I go to localhost:3000

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

But why is that? I know what my password is? Why is it not working? I’m
just trying to use WEBrick…

Anyone know why this is happenning? I’m kinda new to rails I finally got
everything installed using RubyInstaller and now this is happening :confused:

This is the way I’m starting the server:

rails server

Is there not a way to pass my password in? I looked it up but I can’t
find anything…would it be something like rails server -password
“12345”? I tried that but I have no idea any help would be great. Please
help.

This is my stack trace:

mysql2 (0.3.15) lib/mysql2/client.rb:67:in connect' mysql2 (0.3.15) lib/mysql2/client.rb:67:ininitialize’
activerecord (4.0.0)
lib/active_record/connection_adapters/mysql2_adapter.rb:18:in new' activerecord (4.0.0) lib/active_record/connection_adapters/mysql2_adapter.rb:18:inmysql2_connection’
activerecord (4.0.0)
lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in
new_connection' activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:450:incheckout_new_connection’
activerecord (4.0.0)
lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in
acquire_connection' activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:356:inblock in checkout’
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/monitor.rb:211:in
mon_synchronize' activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:incheckout’
activerecord (4.0.0)
lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in
block in connection' C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/monitor.rb:211:inmon_synchronize’
activerecord (4.0.0)
lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in
connection' activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:546:inretrieve_connection’
activerecord (4.0.0) lib/active_record/connection_handling.rb:79:in
retrieve_connection' activerecord (4.0.0) lib/active_record/connection_handling.rb:53:inconnection’
activerecord (4.0.0) lib/active_record/query_cache.rb:51:in
restore_query_cache_settings' activerecord (4.0.0) lib/active_record/query_cache.rb:43:inrescue in
call’
activerecord (4.0.0) lib/active_record/query_cache.rb:32:in call' activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:incall’
activerecord (4.0.0) lib/active_record/migration.rb:369:in call' actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:inblock in call’
activesupport (4.0.0) lib/active_support/callbacks.rb:373:in
_run__1069024569__call__callbacks' activesupport (4.0.0) lib/active_support/callbacks.rb:80:inrun_callbacks’
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in
call' actionpack (4.0.0) lib/action_dispatch/middleware/reloader.rb:64:incall’
actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in
call' actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:incall’
actionpack (4.0.0)
lib/action_dispatch/middleware/show_exceptions.rb:30:in call' railties (4.0.0) lib/rails/rack/logger.rb:38:incall_app’
railties (4.0.0) lib/rails/rack/logger.rb:21:in block in call' activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:inblock
in tagged’
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in
tagged' activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:intagged’
railties (4.0.0) lib/rails/rack/logger.rb:21:in call' actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:incall’
rack (1.5.2) lib/rack/methodoverride.rb:21:in call' rack (1.5.2) lib/rack/runtime.rb:17:incall’
activesupport (4.0.0)
lib/active_support/cache/strategy/local_cache.rb:83:in call' rack (1.5.2) lib/rack/lock.rb:17:incall’
actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in call' railties (4.0.0) lib/rails/engine.rb:511:incall’
railties (4.0.0) lib/rails/application.rb:97:in call' rack (1.5.2) lib/rack/lock.rb:17:incall’
rack (1.5.2) lib/rack/content_length.rb:14:in call' rack (1.5.2) lib/rack/handler/webrick.rb:60:inservice’
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in
service' C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:inrun’
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in
`block in start_thread’

On 7 April 2014 09:21, Jose T. [email protected] wrote:

I’m getting this error when I go to localhost:3000

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

But why is that? I know what my password is? Why is it not working? I’m
just trying to use WEBrick…

Have you specified your username and password in config/database.yml?
If you believe that you have then post database.yml here (but
obviously change the username and password when you paste it in).

Colin

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