Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation instructions for MySQL sub-library and sub-table tool oneproxy

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Description of oneproxy database middleware

# 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. Specify the program directory location of the shell script and startup files started by the middleware

# 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

II. Management of oneproxy

Start the middleware:

Mode one

# sh / usr/local/oneproxy/demo.sh

Mode two

Close the middleware:

Mode one

# / etc/init.d/oneproxy stop

Method 2 (the account password of the management platform used by logging in to the console through the mysql client is required, which is the default password for the middleware)

# install MySQL client

# yum install mysql-y

# mysql-uadmin-pOneProxy-h227.0.0.1-P4041

Mysql > shutdown force

ERROR 2013 (HY000): Lost connection to MySQL server during query

# / etc/init.d/oneproxy start

III. Configuration of oneproxy

3.1 basic configuration

3.2 use of the management platform

Default login management platform account password:

# mysql-uadmin-pOneProxy-h227.0.0.1-P4041

3.2 subtable rule

3.3 description of main parameters

The MySQL node, regardless of whether the Master is real or not, can specify a cluster name with "@". Generally speaking, the primary and secondary nodes with replication relationship should use the same cluster name, and any node must belong to a cluster. If not specified, the default value is "default".

Proxy-slave-addresses, a read-only node, can only be used to forward read requests to MySQL nodes. You can specify multiple MySQL nodes multiple times, regardless of whether the Slave is real or not. You can use "@" to specify a cluster name. Generally speaking, the primary and secondary nodes with replication relationship should use the same cluster name, and any node must belong to a cluster. If not specified, the default value is "default".

Proxy-user-list, all back-end MySQL nodes need to have the user name specified here, and the password should be the same. You can use "@" to specify the default database name that this user uses to connect, and you can use multiple times to specify multiple users.

Proxy-group-policy, which is used to specify the shunting policy of a MySQL cluster. "master-only" means to use only Master, "read-failover" means to switch read to standby when Master is not available, "read-slave" means read-only Slave, and "read-balance" means to read all nodes. You can use multiple times to set different policies for different MySQL master and slave.

Proxy-group-security is used to specify the security policy of a MySQL cluster. Policy 0 is unlimited, policy 1 disables DDL (default), policy 2 means there must be Where conditions, and policy 3 means only query (Select) commands are allowed. Different policies can be set for different MySQL master and slave by using multiple times.

Proxy-part-tables, sub-database sub-table configuration file, json format text, mainly contains the partition logic of the table and the cluster location of each partition. For details, please refer to the introduction of sub-database sub-table section.

Proxy-charset, the character set information of the client.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report