Redmine-Installation - Problem mit dem Ruby MySQL-Connector

1542
Tomer W

Ich versuche, von TRAC zu Redmine zu migrieren,
obwohl bei der Installation ein Problem aufgetreten ist.

Ich folge der Installationsanleitung unter: http://www.redmine.org/projects/redmine/wiki/RedmineInstall
und alles ist in Ordnung ...

  • erstellt die Redmine-Datenbank (leer) in MySQL5.5, fügt den Benutzer Redmine hinzu und verwendet zum Testen "my_password" als Kennwort

  • kopierte die mysqllib.dll von der MySQL Connector/C 6.0.2nach c:\ruby193\bin wie nach der Ausführung vorgeschlagenbundle install -without rmagick

  • bearbeitet database.ymlmit:

produktion:
adapter: mysql2
datenbank: redmine
host: localhost
benutzername: redmine
passwort: mein_kennwort

  • dann set RAILS_ENV=production

  • Als ich versuchte, die Tabellen mit zu generieren, rake db:migrate
    bekam ich den folgenden Fehler (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 

Versionsinformationen:
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

  • Die Anmeldung mit MySQL Workbench wurde getestet ... und funktioniert ordnungsgemäß.

Bitte helfen, was soll ich überprüfen?

0

1 Antwort auf die Frage

0
Tomer W

Nun, einfach nur unglaublich!
ya, wütend auf mich selbst :)

nach 1 stunde kämpfe um eine lösung, poste ich diese frage ...

5 Minuten nach der Veröffentlichung dieser Frage sehe ich die Lösung in StackOverflow ... https://stackoverflow.com/questions/10892689/cant-connect-to-mysql-server-on-localhost-10061- after-installation

Nur nicht verwenden, localhost
sondern 127.0.0.1stattdessen verwenden!

wunderschön ... ich fühle mich so dumm ... aber es ist besser so zu werden ...
hoffe, dass niemand mehr damit umgehen muss: ~)