[Sqlrelay-discussion] mysql proxy
Brought to you by:
mused
|
From: Nick W. <woo...@ho...> - 2006-05-31 20:19:58
|
Hi All,
I am trying to setup SQL Relay to behave as an effective proxy for MySQL
requests on any MySQL database. I would like any person connecting to any
database through mysql locally (192.168.51) through mysql.sock to connect
out through SQL Relay to one of two back end servers - two nodes on a MySQL
cluster (192.168.1.54 and 192.168.1.53).
I have setup SQLRelay with a configuration as described below:
<?xml version="1.0"?>
<!DOCTYPE instances SYSTEM "sqlrelay.dtd">
<instances>
<instance id="defaultid" port="3306"
socket="/var/lib/mysql/mysql.sock" connections="1" maxconnections="6"
dbase="mysql" maxqueuelength="0" growby="1" ttl="60" endofsession="commit"
sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5"
authtier="database" handoff="pass">
<users>
</users>
<connections>
<connection connectionid="kudos-file-linux-two"
string="db=mysqlclustertest;user=root;password=XXXXXXXX;host=192.168.1.53;port=3306;"
metric="1" behindloadbalancer="no" />
<connection connectionid="kudos-file-linux-two"
string="db=mysqlclustertest;user=root;password=XXXXXXXX;host=192.168.1.53;port=3306;"
metric="1" behindloadbalancer="no" />
</connections>
</instance>
</instances>
I am having a few problems with this. SQL relay seems to be mainly geared
for connection to an individual database - is this correct? With that in
mind, i don't really want to specify a database in the connection string,
but on reading the documentation there seems no other way.
I would really like for it to be able to connect to any database that is
requested by the user through on the mysql proxy and for that to go off to
the cluster. (the authtier=database setting i presume would sort out any
user being able to connect?)
Also, if i want to configure my proxy server to talk out using SQL Relay
with the drop in libraries with PHP and Apache - is it just a case of
modifying the /etc/init.d/httpd start up script with the LD_PRELOAD
statement - or is it more complicated than this?
Any problems anyone can see with my configuration or ideas, please let me
know! I know someone has achieved what i am after ... but just not quite
sure how they managed it!
Thanks,
Nick
|