Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to migrate from TRAC to Redmine,
though i encountered a problem with the installation procedure.

i follow the install guide at : http://www.redmine.org/projects/redmine/wiki/RedmineInstall
and everything got allright...

  • created the redmine database (empty) in MySQL5.5, added the user redmine, and for testing used 'my_password' as password

  • copied the mysqllib.dll from the MySQL Connector/C 6.0.2 to c:\ruby193\bin as suggested after executing bundle install -without rmagick

  • edited database.yml with :

production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: my_password

  • then set RAILS_ENV=production

  • when i tried to generate the tables using rake db:migrate
    i got the following error (additng --trace):

    C:\Program Files (x86)\redMine 2.1-stable>rake db:migrate --trace
    ** Invoke db:migrate (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    rake aborted!
    Can't connect to MySQL server on 'localhost' (10061)
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/client.rb:44:in `connect'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/client.rb:44:in `initialize'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:309:in `new_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:319:in `checkout_new_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:241:in `block (2 levels) in checkout'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in `loop'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:236: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.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:233:in `checkout'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:96:in `block in connection'
    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.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:404:in `retrieve_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:170:in `retrieve_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:144:in `connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/model_schema.rb:308:in `clear_cache!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/railtie.rb:97:in `block (2 levels) in <class:Railtie>'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:418:in `_run__792713192__prepare__98754910__callbacks'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
    C:/Program Files (x86)/redMine 2.1-stable/config/environment.rb:14:in `<top (required)>'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:103:in `require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:103:in `require_environment!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:295:in `block (2 levels) in initialize_tasks'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:227:in `call'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:227:in `block in execute'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:222:in `each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:222:in `execute'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
    C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:159:in `invoke_with_call_chain'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:187:in `block in invoke_prerequisites'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:185:in `each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:185:in `invoke_prerequisites'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:165:in `block in invoke_with_call_chain'
    C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:159:in `invoke_with_call_chain'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:152:in `invoke'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:141:in `invoke_task'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:99:in `block (2 levels) in top_level'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:99:in `each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:99:in `block in top_level'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:108:in `run_with_threads'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:93:in `top_level'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:71:in `block in run'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:68:in `run'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/bin/rake:37:in `<top (required)>'
    C:/Ruby193/bin/rake:23:in `load'
    C:/Ruby193/bin/rake:23:in `<main>'
    Tasks: TOP => db:migrate => environment
    

Versions information:
Windows 7 x64 Professional
MySql 5.5.4
MySql Connector/C 6.0.2
ruby -v => ruby 1.9.3p327 (2012-11-10) [i386-mingw32]
gem -v => 1.8.24

  • Tested the login using MySQL Workbench... working correctly.

Please help, what should i check?

share|improve this question

1 Answer 1

Well just **ing amazing !
ya, an angry at myself post :)

after 1 hour fighting to find a solution, i post this question...

5 minutes after posting this question i see the solution in StackOverflow...
http://stackoverflow.com/questions/10892689/cant-connect-to-mysql-server-on-localhost-10061-after-installation

Just not use localhost
but use 127.0.0.1 instead !

beautiful... i feel so dumb... but better turn out this way...
hope noone will need to handle this anymore :~)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.