ruby - Error running WEBrick: Can't Connect to MySQL server -
hey can't figure out fix error message. started ruby rails , trying set can learn more , stuck on trying webrick work. help, thanks!
c:\users\brandon\documents\sites\simple_cms>rails server => booting webrick => rails 3.2.13 application starting in development on http://0.0.0.0:3000 => call -d detach => ctrl-c shutdown server exiting c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec tion_adapters/mysql_adapter.rb:411:in `real_connect': can't connect mysql ser ver on 'localhost' (10061) (mysql::error) c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/mysql_adapter.rb:411:in `connect' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/mysql_adapter.rb:131:in `initialize' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/mysql_adapter.rb:38:in `new' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/mysql_adapter.rb:38:in `mysql_connection' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_conn ection' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_pool.rb:242:in `loop' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout ' c:/ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_pool.rb:239:in `checkout' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_pool.rb:102:in `block in connecti on' c:/ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_pool.rb:101:in `connection' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connecti on' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve _connection' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/connection_adapters/abstract/connection_specification.rb:145:in `connecti on' c:/ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_ record/railtie.rb:88:in `block in <class:railtie>' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/initi alizable.rb:30:in `instance_exec' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/initi alizable.rb:30:in `run' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/initi alizable.rb:55:in `block in run_initializers' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/initi alizable.rb:54:in `each' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/initi alizable.rb:54:in `run_initializers' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/appli cation.rb:136:in `initialize!' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/railt ie/configurable.rb:30:in `method_missing' c:/users/brandon/documents/sites/simple_cms/config/environment.rb:5 :in `<top (required)>' c:/users/brandon/documents/sites/simple_cms/config.ru:3:in `require ' c:/users/brandon/documents/sites/simple_cms/config.ru:3:in `block n <main>' c:/ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb: 51:in `instance_eval' c:/ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb: 51:in `initialize' c:/users/brandon/documents/sites/simple_cms/config.ru:in `new' c:/users/brandon/documents/sites/simple_cms/config.ru:in `<main>' c:/ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb: 40:in `eval' c:/ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb: 40:in `parse_file' c:/ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:2 00:in `app' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/comma nds/server.rb:46:in `app' c:/ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:3 04:in `wrapped_app' c:/ruby193/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:2 54:in `start' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/comma nds/server.rb:70:in `start' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/comma nds.rb:55:in `block in <top (required)>' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/comma nds.rb:50:in `tap' c:/ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/comma nds.rb:50:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>'
i trying different things make work , seen said problem not having gemfile opensll or , read thing said try rake db:create , got error message also.
c:\users\brandon\documents\sites\simple_cms>rake db:create can't connect mysql server on 'localhost' (10061) couldn't create database {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnec t"=>false, "database"=>"simple_cms_development", "pool"=>5, "username"=>"root", "password"=>nil, "host"=>"localhost"}, charset: utf8, collation: utf8_unicode_ci (if set charset manually, make sure have matching collation) can't connect mysql server on 'localhost' (10061) couldn't create database {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnec t"=>false, "database"=>"simple_cms_test", "pool"=>5, "username"=>"root", "passwo rd"=>nil, "host"=>"localhost"}, charset: utf8, collation: utf8_unicode_ci (if set charset manually, make sure have matching collation)
it looks whatever configuration information in config/database.yml
invalid or haven't configured mysql server correctly.
from error you're receiving looks mysql server isn't running, or isn't responding on port you've defined.
test can connect mysql
command-line tool or equivalent.
Comments
Post a Comment