{"issue":{"created_at":"2010-12-20T21:10:40Z","state":"closed","updated_at":"2011-12-01T15:14:02Z","comments":19,"user":{"gravatar_id":"70de23cfa408edce373604a201e31d58","id":531077,"url":"https://api.github.com/users/remkade","avatar_url":"https://secure.gravatar.com/avatar/70de23cfa408edce373604a201e31d58?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"remkade"},"body":"When I do a `rake snorby:setup` in the snorby directory Datamapper always attempts to connect to localhost despite me specifying an external MySQL server. Here's the error:\n\n        snorby $ rake snorby:setup\n        (in /web/sites/home/snorby)\n        ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)\n        rake aborted!\n        Incorrect table definition; there can be only one auto column and it must be defined as a key\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/adapters/dm-do-adapter.rb:70:in `execute_non_query'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/adapters/dm-do-adapter.rb:70:in `block (2 levels) in upgrade_model_storage'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/adapters/dm-do-adapter.rb:64:in `map'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/adapters/dm-do-adapter.rb:64:in `block in upgrade_model_storage'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-do-adapter-1.0.2/lib/dm-do-adapter/adapter.rb:260:in `with_connection'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/adapters/dm-do-adapter.rb:63:in `upgrade_model_storage'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:71:in `upgrade_model_storage'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:143:in `auto_upgrade!'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:45:in `block in repository_execute'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-core-1.0.2/lib/dm-core/support/descendant_set.rb:68:in `block in each'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-core-1.0.2/lib/dm-core/support/descendant_set.rb:67:in `each'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-core-1.0.2/lib/dm-core/support/descendant_set.rb:67:in `each'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:44:in `repository_execute'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:27:in `auto_upgrade!'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-rails-1.0.4/lib/dm-rails/railties/database.rake:47:in `block (3 levels) in <top (required)>'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-rails-1.0.4/lib/dm-rails/railties/database.rake:46:in `each'\n        /web/sites/home/snorby/vendor/cache/ruby/1.9.1/gems/dm-rails-1.0.4/lib/dm-rails/railties/database.rake:46:in `block (2 levels) in <top (required)>'\n        /usr/local/lib/ruby/1.9.1/rake.rb:634:in `call'\n        /usr/local/lib/ruby/1.9.1/rake.rb:634:in `block in execute'\n        /usr/local/lib/ruby/1.9.1/rake.rb:629:in `each'\n        /usr/local/lib/ruby/1.9.1/rake.rb:629:in `execute'\n        /usr/local/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'\n        /usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'\n        /usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'\n        /usr/local/lib/ruby/1.9.1/rake.rb:581:in `invoke'\n        /web/sites/home/snorby/lib/tasks/snorby.rake:28:in `block (2 levels) in <top (required)>'\n        /usr/local/lib/ruby/1.9.1/rake.rb:634:in `call'\n        /usr/local/lib/ruby/1.9.1/rake.rb:634:in `block in execute'\n        /usr/local/lib/ruby/1.9.1/rake.rb:629:in `each'\n        /usr/local/lib/ruby/1.9.1/rake.rb:629:in `execute'\n        /usr/local/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'\n        /usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'\n        /usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'\n        /usr/local/lib/ruby/1.9.1/rake.rb:581:in `invoke'\n        /usr/local/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'\n        /usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'\n        /usr/local/lib/ruby/1.9.1/rake.rb:2019:in `each'\n        /usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'\n        /usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'\n        /usr/local/lib/ruby/1.9.1/rake.rb:2013:in `top_level'\n        /usr/local/lib/ruby/1.9.1/rake.rb:1992:in `run'\n        /usr/local/bin/rake:31:in `<main>'V\n\n\nHere is my database.yml (hostname and password changed of course):\n    # Snorby Database Configuration\n    #\n    # Please set your database password/user below\n    #\n    snorby: &snorby\n      adapter: mysql\n      database: snorby\n      username: snorby\n      password: PASSWORD\n      host: mysql.example.com\n    \n    development:\n      database: snorby\n      <<: *snorby\n\n    test:\n      database: snorby\n      <<: *snorby\n    \n    production:\n      database: snorby\n      <<: *snorby","assignee":null,"id":484996,"number":19,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"Bug","color":"fff200","url":"https://api.github.com/repos/Snorby/snorby/labels/Bug"},{"name":"Database","color":"571818","url":"https://api.github.com/repos/Snorby/snorby/labels/Database"},{"name":"In Progress","color":"000dff","url":"https://api.github.com/repos/Snorby/snorby/labels/In+Progress"},{"name":"User Support","color":"ff00ee","url":"https://api.github.com/repos/Snorby/snorby/labels/User+Support"}],"title":"Snorby tries to use localhost for MySQL when an external host is specified","html_url":"https://github.com/Snorby/snorby/issues/19","closed_at":"2011-11-23T16:20:51Z","url":"https://api.github.com/repos/Snorby/snorby/issues/19","milestone":null},"action":"created","comment":{"created_at":"2011-12-01T15:14:02Z","updated_at":"2011-12-01T15:14:02Z","user":{"gravatar_id":"81e8b4c762118b1779d195254410d177","id":315873,"url":"https://api.github.com/users/terracatta","avatar_url":"https://secure.gravatar.com/avatar/81e8b4c762118b1779d195254410d177?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"terracatta"},"body":"This fundamental issue here is with Datamapper (ActiveRecord can do remote creates), we may improve the snorby:setup workflow in the future to check for a remote host and advise the user accordingly.","id":2975768,"url":"https://api.github.com/repos/Snorby/snorby/issues/comments/2975768"}}