I figured this out: If you simply tab over the "read_only" section by
2,
(and perhaps remove the blank line), then it is treated as part of the
"production" db configuration.
m
On 9/21/07, Marc Byrd
<dr.marc.byrd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> I have replicated my db (mysql) and have hit roadblocks with both
> mysql-proxy and with acts_as_readonlyable .
>
> Firstly, is there something else I should be using?
>
> What would be the advantages of mysql-proxy over in-rails solutions? One
> is that it keeps the rails config and code simpler, puts the db redirection
> (kinda) where it should be, at the (kinda) db layer of the architecture.
>
> Has anyone used both? That person would have great authority...
>
> With mysql-proxy, I''m getting no reads on the readonly slave, only
message
> I''m getting is "no handler for COM_CONNECT" grr
>
> With acts_as_readonlyable, I''m getting: "No db config entry
defined for
> read_only"
>
> Here''s my config/database.yml (some names changed to protect the
> innocent):
> production:
> database: master_db
> adapter: mysql
> database: mydb_production
> username: myusr
> password: *******
> host: *.*.*.96
> encoding: utf8
>
> read_only:
> database: read_only
> adapter: mysql
> database: mydb_production
> username: myusr
> password: ************
> host: *.*.*.192
> encoding: utf8
>
>
>
>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---