oneproxy Database middleware Instructions
#wget http://www.onexsoft.com/software/oneproxy-rhel5-linux64-v6.0.0-ga.tar.gz
# TAR-ZXVF oneproxy-rhel5-linux64-v6.0.0-ga.tar.gz-c/usr/local/
# cd/usr/local/oneproxy/
1 . Specifies the middleware-initiated Shell program directory location for scripts and startup files
# sed-i ' s/^export.*$/export\ oneproxy_home=\/usr\/local\/oneproxy/g ' demo.sh
# sed-i ' s/^oneproxy_home=.*$/oneproxy_home=\/usr\/local\/oneproxy/g ' Oneproxy.service
# CP Oneproxy.service/etc/init.d/oneproxy
# chmod +x/etc/init.d/oneproxy
# chkconfig--add oneproxy
# Chkconfig Oneproxy on
Second, Oneproxy the management
Start middleware:
Way One
# sh/usr/local/oneproxy/demo.sh
Way Two
To turn off middleware:
Way One
#/etc/init.d/oneproxy Stop
Way two (need to pass MySQL Client Login Console uses the Admin platform account password for the middleware default password )
# Install the MySQL client
# yum Install mysql-y
# mysql-uadmin-poneproxy-h127.0.0.1-p4041
mysql> shutdown Force;
ERROR (HY000): Lost connection to MySQL server during query
#/etc/init.d/oneproxy Start
Third, Oneproxy the configuration
3.1 Basic Configuration
3.2 use of the management platform
default Login Management Platform account Password :
# mysql-uadmin-poneproxy-h127.0.0.1-p4041
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/06/7E/wKiom1m48PTzXNnLAACSWTyE_lg628.png-wh_500x0-wm_ 3-wmp_4-s_3651636062.png "style=" Float:none; "title=" Picture 1.png "alt=" Wkiom1m48ptzxnnlaacswtye_lg628.png-wh_50 "/>
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/A5/2E/wKioL1m48M2yoDyQAAVZ5_xoNJI457.png-wh_500x0-wm_ 3-wmp_4-s_3869847885.png "style=" Float:none; "title=" Picture 2.png "alt=" Wkiol1m48m2yodyqaavz5_xonji457.png-wh_50 "/>
3.2 of the Sub-table rules
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/06/7E/wKiom1m48PaTayhcAACOpwGjf0M226.png-wh_500x0-wm_ 3-wmp_4-s_335934989.png "title=" Picture 3.png "style=" Float:none; "alt=" Wkiom1m48patayhcaacopwgjf0m226.png-wh_50 "/>
3.3 Main parameter Description
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/06/7E/wKiom1m48PfSw7DqAAA14E0hLp4093.png-wh_500x0-wm_ 3-wmp_4-s_331512644.png "title=" Picture 4.png "style=" Float:none; "alt=" Wkiom1m48pfsw7dqaaa14e0hlp4093.png-wh_50 "/>
MySQLnode,and whether it is true Masterirrelevant,can be used"@"to specify a cluster name. Typically have a replication relationship the primary and standby nodes,should all use the same cluster name,any node must belong to a in a cluster,If you don't specify,The default value is"default".
proxy-slave-addresses,read-only node,can only be used to forward read requests. MySQLnode,Multiple times can be used to specify more than one MySQLnode,and whether it is true Slaveirrelevant,can be used"@"to specify a cluster name. Typically have a replication relationship the primary and standby nodes,should all use the same cluster name,any node must belong to a in a cluster,If you don't specify,The default value is"default".
proxy-user-list,All back end MySQLnodes are required to have the user name specified here,The same password is needed .,can be used"@"to specify the default database name to use for this user connection,multiple users can be specified using multiple times.
Proxy-group-policy,used to specify a MySQLThe shunt strategy of the cluster,Strategy"master-only"indicates that only use the Master,to be"Read-failover"represents MasterWhen not available, it will be read and cut to standby,Strategy"Read-slave"indicates read-only Slave,Strategy "read-balance"indicates that all nodes are read,can be used multiple times for differentMySQLMaster and Standby sets different policies.
proxy-group-security,used to specify a MySQLsecurity policies for clusters, Strategy0for Unrestricted,Strategy 1disabled TheDDL (Default Value),Strategy2means there must beWhereconditions,Strategy3indicates that only queries are allowed(Select)Command,can be To use multiple times for differentMySQLMaster and Standby sets different policies.
proxy-part-tables , sub-Library table configuration file ,json format text , mainly contains , details refer to the section of the Sub-Library table.
Proxy-charset , the character set information for the client.
This article from the "Linux Fairy Road" blog, reproduced please contact the author!
MySQL Sub-Library sub-table tool Oneproxy installation Instructions