moving redmine to another server

Added by Alex Fichter over 9 years ago

Hi everyone, I hope you can help me. I have been asked to move redmine to a new server, and the guys who initially installed and set it up are long gone. I am not a hipster with this type of software so this is all new to me. I have started by doing a brute copy of the folders to the new server, including the registry entries. I run C:\Ruby\Projects\Redmine\script\server -e production --port 80 and it does indeed start up. But when I connect to localhost:3000 I get:

Mysql::Error

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

RAILS_ROOT: C:/Ruby/Projects/Redmine
Application Trace | Framework Trace | Full Trace

vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:523:in `read'
vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:153:in `real_connect'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:471:in `connect'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:165:in `initialize'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `new'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `send'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `connection='
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
vendor/rails/activerecord/lib/active_record/base.rb:1063:in `table_exists?'
vendor/rails/activerecord/lib/active_record/base.rb:1153:in `inspect'
vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `__send__'
vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `to_proc'
vendor/rails/activesupport/lib/active_support/dependencies.rb:426:in `collect'
vendor/rails/activesupport/lib/active_support/dependencies.rb:426:in `log_call'
vendor/rails/activesupport/lib/active_support/dependencies.rb:222:in `load_missing_constant'
vendor/rails/activesupport/lib/active_support/dependencies.rb:469:in `const_missing'
app/models/repository.rb:20
app/models/repository/subversion.rb:20
app/controllers/application.rb:23
app/controllers/application.rb:22:in `each'
app/controllers/application.rb:22

vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:523:in `read'
vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:153:in `real_connect'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:471:in `connect'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:165:in `initialize'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `new'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `send'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `connection='
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
vendor/rails/activerecord/lib/active_record/base.rb:1063:in `table_exists?'
vendor/rails/activerecord/lib/active_record/base.rb:1153:in `inspect'
vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `__send__'
vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `to_proc'
vendor/rails/activesupport/lib/active_support/dependencies.rb:426:in `collect'
vendor/rails/activesupport/lib/active_support/dependencies.rb:426:in `log_call'
vendor/rails/activesupport/lib/active_support/dependencies.rb:222:in `load_missing_constant'
vendor/rails/activesupport/lib/active_support/dependencies.rb:469:in `const_missing'
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:202:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:248:in `load_missing_constant'
vendor/rails/activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
vendor/rails/activesupport/lib/active_support/dependencies.rb:465:in `const_missing'
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:202:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
vendor/rails/activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:202:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
vendor/rails/activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:141:in `prepare_application'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:178:in `send!'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:178:in `run_callbacks'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:175:in `each'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:175:in `send!'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:175:in `run_callbacks'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:114:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
vendor/rails/railties/lib/webrick_server.rb:112:in `handle_dispatch'
vendor/rails/railties/lib/webrick_server.rb:78:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
vendor/rails/railties/lib/webrick_server.rb:62:in `dispatch'
vendor/rails/railties/lib/commands/servers/webrick.rb:66
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
vendor/rails/railties/lib/commands/server.rb:39
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
script/server:3

vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:523:in `read'
vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:153:in `real_connect'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:471:in `connect'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:165:in `initialize'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `new'
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `send'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `connection='
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
vendor/rails/activerecord/lib/active_record/base.rb:1063:in `table_exists?'
vendor/rails/activerecord/lib/active_record/base.rb:1153:in `inspect'
vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `__send__'
vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `to_proc'
vendor/rails/activesupport/lib/active_support/dependencies.rb:426:in `collect'
vendor/rails/activesupport/lib/active_support/dependencies.rb:426:in `log_call'
vendor/rails/activesupport/lib/active_support/dependencies.rb:222:in `load_missing_constant'
vendor/rails/activesupport/lib/active_support/dependencies.rb:469:in `const_missing'
app/models/repository.rb:20
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:202:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:248:in `load_missing_constant'
vendor/rails/activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
vendor/rails/activesupport/lib/active_support/dependencies.rb:465:in `const_missing'
app/models/repository/subversion.rb:20
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:202:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
vendor/rails/activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
app/controllers/application.rb:23
app/controllers/application.rb:22:in `each'
app/controllers/application.rb:22
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking'
vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:202:in `load_file'
vendor/rails/activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
vendor/rails/activesupport/lib/active_support/dependencies.rb:442:in `require_dependency'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:141:in `prepare_application'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:178:in `send!'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:178:in `run_callbacks'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:175:in `each'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:175:in `send!'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:175:in `run_callbacks'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:114:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
vendor/rails/railties/lib/webrick_server.rb:112:in `handle_dispatch'
vendor/rails/railties/lib/webrick_server.rb:78:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
vendor/rails/railties/lib/webrick_server.rb:62:in `dispatch'
vendor/rails/railties/lib/commands/servers/webrick.rb:66
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
vendor/rails/railties/lib/commands/server.rb:39
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
script/server:3

Request

Parameters:

None

Show session dump

---
flash: !map:ActionController::Flash::FlashHash {}

Response

Headers:

{"cookie"=>[],
"Cache-Control"=>"no-cache"}

I am hoping this is something simple. Anyone able to help me?

Replies (6)

RE: moving redmine to another server - Added by Carl Nygard over 9 years ago

You moved your redmine code to the new server, and it's trying to access the MySQL database on the localhost (i.e. same machine). Either you need to set up the configuration (./config/database.yml) to point to where your MySQL database for the redmine system is running (i.e. on another machine) or you need to set up the permissions on the MySQL database running on the new server (look at MySQL documentations referencing GRANT...)

RE: moving redmine to another server - Added by Alex Fichter over 9 years ago

Thanks, that's actually very helpful. It doesn't help that I am no SQL expert, but apparently it's time for me to learn about it. Now I know where to focus my effort tho!

RE: moving redmine to another server - Added by Alex Fichter over 9 years ago

Now I have redmine running and I can access it but it appears to be completely blank, none of our data is there.

I used heidi sql to export the database from the original server and import it on the new machine and that appears to have gone just fine. I also confirmed the settings in the database.yml file to make sure everything was setup right, and it does look right.

Any ideas on what I am missing?

RE: moving redmine to another server - Added by Alex Fichter over 9 years ago

Actually I figured this out. Heidi has a lot of trouble exporting and importing, but once I played around with it I got it working and now we are good to go.

RE: RE: moving redmine to another server - Added by Carl Nygard over 9 years ago

Just for your information, you should have been able to use mysqldump to dump the contents to a file, then piping that back through msyql:


 % mysqldump -p -u <user> -h <hostname> <database> > dump.sql
 % cat dump.sql | mysql -p -u <user> -h <hostname> <other-database>

RE: moving redmine to another server - Added by Alex Fichter over 9 years ago

Aha, so that's how you do it! Thanks for the info!.

(1-6/6)