Hi All,
I'm having difficulties with the above module and can't see what I'm doing
wrong.
Config as follows:
modparam("db_cluster", "connection", "db01=>mysql://
readwrite:password@db01.domain.com/kamailio")
modparam("db_cluster", "connection", "db02=>mysql://
readonly:password@db02.domain.com/kamailio")
modparam("db_cluster", "cluster",
"cls1=>db01=0s9s;db02=9s0s")
As you can see, there are two database servers - a master and a slave. I am
trying to force all read operations to the slave (db02) and all write
operations to the master (db01).
Unless I am missing the point, the above priorities should achieve the
desired effect. However, it seems to be going wrong somewhere as write
operations are being sent to the slave:
ERROR: db_mysql [km_dbase.c:122]: driver error on query: DELETE command
denied to user 'readonly'(a)'x.x.x.x'
for table 'location'
ERROR: db_mysql [km_dbase.c:122]: driver error on query: UPDATE command
denied to user 'readonly'(a)'x.x.x.x'
for table 'location'
ERROR: db_mysql [km_dbase.c:122]: driver error on query: INSERT command
denied to user 'readonly'(a)'x.x.x.x' for table 'location'
It is the same for all modules, by the way, not just usrloc. For each
module, I have db_url set to "cluster://cls1".
If I change the cluster definition to "cls1=>db01=9s9s;db02=0s0s", all
operations (read and write) are sent to db01 as expected.
Am I missing something here? Can anyone see what I may be doing wrong?
Many thanks,
Charles
--
www.sipcentric.com
Follow us on twitter @sipcentric <http://twitter.com/sipcentric>
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham
B7 4EJ.