Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added README
  • Loading branch information
trampoline committed Mar 20, 2009
1 parent df20fa7 commit 70a4285
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README
@@ -0,0 +1,12 @@
an ActiveRecord-JDBC plugin for working with MySQL master slave databases

- install in vendor/plugins directory
- use adapter "mysql"
- use MySQL Connector/J JDBC replication driver: com.mysql.jdbc.ReplicationDriver
- configure your master and slaves in the MySQL JDBC url in the normal way e.g.

jdbc:mysql://masterhost:3306,slavehost:3307/databasename?autoReconnect=false&useUnicode=true&connectionCollation=utf8_general_ci&characterSetResults=utf8&autoReconnectForPools=true&jdbcCompliantTruncation=false&characterEncoding=utf8

- selects which are outside of a transaction will be sent to the slaves
- any non-select queries or queries inside a transaction will be sent to the master
- ActiveRecord::ConnectionAdapters::JdbcAdapter::with_master can be used to force use of the master for all queries

0 comments on commit 70a4285

Please sign in to comment.