lua-5.0.2-1.el5.rf.i386.rpm mysql-proxy-0.8.0-linux-rhel5-x86-32bit.tar.gz
lua-devel-5.0.2-1.el5.rf.i386.rpm
[root@proxy ~]# rpm -ivh lua-5.0.2-1.el5.rf.i386.rpm
warning: lua-5.0.2-1.el5.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]
1:lua ########################################### [100%]
warning: lua-devel-5.0.2-1.el5.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]
1:lua-devel ########################################### [100%]
[root@proxy ~]# tar xzf mysql-proxy-0.8.0-linux-rhel5-x86-32bit.tar.gz -C /usr/local/
[root@proxy ~]# cd /usr/local
[root@proxy ~]# mv mysql-proxy-0.8.0-linux-rhel5-x86-32bit/ proxy
启动 MySQL: [确定]
[root@MASTER ~]#
启动 MySQL: [确定]
[root@BACKUP ~]#
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.77 Source distribution
Database changed
mysql> create table test(id int);
Query OK, 0 rows affected (0.04 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution
Database changed
mysql> create table test(id int);
Query OK, 0 rows affected (0.02 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges ;
Query OK, 0 rows affected (0.00 sec)
Query OK, 1 row affected (0.00 sec)
/usr/local/proxy/share/doc/mysql-proxy
[root@proxy mysql-proxy]# vi rw-splitting.lua
# max_idle_connections = 8,
2011-12-09 21:28:39: (critical) chassis-limits.c:81: could not raise RLIMIT_NOFILE to 8192, Invalid argument (22). Current limit still 1024.
tcp 0 0 192.168.0.17:3306 0.0.0.0:* LISTEN 23560/mysql-proxy
[root@localhost ~]#
client default db:
syncronizing
server default db: test
client default db:
syncronizing
server default db: test
client default db: zhaoyun
syncronizing