tchandy/octopus — Issue #56: Credentials incorrect for mysql connection
Author: TvL2386
Created: 2011-11-15 14:34:49+00:00
State: open

Hi,

I was wanting to give this gem a try, sounds promising.
I've got this database.yml:

```yaml
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: app_production
pool: 5
username: app
password: app
host: "192.168.254.10"
```

I've got this shards.yml:

```yaml
octopus:
replicated: true

environments:
- production

production:
slave1:
host: 192.168.254.10
adapter: mysql2
database: app_production
user: app
password: app2386
slave2:
host: 192.168.254.11
adapter: mysql2
database: app_production
user: app
password: app2386
```

I've setup mysql master/slave and imported the dump of my application.
192.168.254.10 is the master, 192.168.254.11 is the slave. (I've also ran this app with slave1 commented, since I thought it may clash with the one configured in database.yml)

When running the application, I get the following in the logging:
Mysql2::Error (Access denied for user 'root'@'rails1' (using password: YES)):

(rails1 is the hostname of the server)
It seems like it doesn't pick up on what I've got configured

This is my bundle:

```
$ bundle show
Gems included by the bundle:
* actionmailer (3.1.1)
* actionpack (3.1.1)
* activemodel (3.1.1)
* activerecord (3.1.1)
* activeresource (3.1.1)
* activesupport (3.1.1)
* albino (1.3.3)
* ar-octopus (0.4.0 433befd)
* arel (2.2.1)
* awesome_print (0.4.0)
* builder (3.0.0)
* bundler (1.0.21)
* cancan (1.6.7)
* carmen (0.2.8)
* chronic (0.6.5)
* coffee-script (2.2.0)
* coffee-script-source (1.1.3)
* dnsruby (1.52)
* erubis (2.7.0)
* execjs (1.2.9)
* geocoder (1.0.5)
* haml (3.1.3)
* hike (1.2.1)
* httparty (0.8.1)
* i18n (0.6.0)
* ipaddress (0.8.0)
* jquery-rails (1.0.17)
* json (1.6.1)
* kaminari (0.12.4)
* libv8 (3.3.10.2)
* mail (2.3.0)
* mime-types (1.17.2)
* multi_json (1.0.3)
* multi_xml (0.4.1)
* mysql2 (0.3.10)
* nokogiri (1.5.0)
* paper_trail (2.5.0)
* polyamorous (0.5.0)
* polyglot (0.3.3)
* posix-spawn (0.3.6)
* progressbar (0.9.1)
* rack (1.3.5)
* rack-cache (1.1)
* rack-mount (0.8.3)
* rack-protection (1.1.4)
* rack-ssl (1.3.2)
* rack-test (0.6.1)
* rails (3.1.1)
* railties (3.1.1)
* rake (0.9.2.2)
* ransack (0.5.8)
* rdoc (3.11)
* redcarpet (1.17.2)
* redis (2.2.2)
* redis-namespace (1.0.3)
* resque (1.19.0 af5a9a8)
* ruby-ip (0.9.0)
* sass (3.1.10)
* sass-rails (3.1.4)
* sinatra (1.3.1)
* sprockets (2.0.3)
* squeel (0.9.3)
* test-unit (2.4.1)
* therubyracer (0.9.9)
* thor (0.14.6)
* tilt (1.3.3)
* treetop (1.4.10)
* tzinfo (0.3.31)
* uglifier (1.0.4)
* vegas (0.1.8)
* whenever (0.7.0)
```