# Mysql-proxy vs. acts\_as\_readonlyable vs.?

**URL:** <https://www.ruby-forum.com/t/mysql-proxy-vs-acts-as-readonlyable-vs/115202>\
**Category:** Rails\
**Created:** [September 21, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/mysql-proxy-vs-acts-as-readonlyable-vs/115202 "2007-09-21T17:57:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcbey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@marcbey](https://www.ruby-forum.com/u/marcbey)\
**Post date:** [September 21, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/mysql-proxy-vs-acts-as-readonlyable-vs/115202/1 "2007-09-21T17:57:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![marcbey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@marcbey](https://www.ruby-forum.com/u/marcbey)\
**Post date:** [September 24, 2007, 9:21pm UTC](https://www.ruby-forum.com/t/mysql-proxy-vs-acts-as-readonlyable-vs/115202/2 "2007-09-24T21:21:20Z")

</div>

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
