Oneproxy get started quickly

Source: Internet
Author: User
Tags valgrind

   Oneproxy is a database middleware, and currently on the market Tddl, mysql-proxy belong to the same type of products. We adhere to the development of Oneproxy is based on the following considerations:      1. We do not want to be bound by one of the development languages: TDDL bound customers must use Java to do the development language, and the overall system of the normal operation is very dependent on a strong configuration push center and strong operations team;      2. Use must be transparent: Mysql-proxy implements the MySQL protocol, making it look like a MySQL database, so customers can manipulate the database in any language they prefer. Therefore, oneproxy the implementation of the Protocol.       3. We need more stable, more versatile middleware: Sadly, official attention to this product seems inadequate. Since the launch of the first edition in 2007 to 2015 years, nearly eight years, still not reached the GA state.   Our oneproxy is a product that Lou Fangxin is trying to build, and every line of code in it has a wealth of experience. It can be said that Oneproxy was born to combat.     Then I'm going to throw out one of the most frequently encountered questions here, what if the database hangs up?         1. Manually change the application configuration, too low, even if it is not too low, but when you have 20 of applications to manually change it?         2. Virtual IP auto-drift, elegant solution, but requires the cooperation of OPS;        3. Why not try Oneproxy's built-in database switching scheme, and the DBA does it.       But don't worry, we're going to build this system together today.          1. There's a Linux 64bit machine on hand         2. Download installation files from Baidu Cloud disk  http://pan.baidu.com/s/1mgJpukg#path=%252FOneSQL%252FOneProxy        3. Installation             &NBsp   Extract to specified directory                      mv oneproxy-rhel5-linux64*  /usr/local/                     tar ZXVF Oneproxy-rhel5-linux 64*                change startup file                &NB SP;CD oneproxy/               cat demo.sh###################################### #######################/bin/bash
#
Export Oneproxy_home=/data/oneproxy

If [-f ${oneproxy_home}/oneproxy.pid]; Then
Kill-9 ' Cat ${oneproxy_home}/oneproxy.pid '
Fi

Sleep 2
# Valgrind--leak-check=full--show-reachable=yes \
${oneproxy_home}/oneproxy--proxy-address=:3307--proxy-extra-address=:3308 \
--proxy-master-addresses=192.168.1.119:3306@default \
--proxy-user-list=test/[email protected] \
--proxy-part-tables=${oneproxy_home}/part.txt \
--proxy-charset=gbk_chinese_ci--proxy-found-rows \
--proxy-group-policy=default:master-only \
--event-threads=6--proxy-group-security=default:0 \
--log-file=${oneproxy_home}/oneproxy.log \
--pid-file=${oneproxy_home}/oneproxy.pid ############################################################ #############################################################/bin/bash after change
#
Export Oneproxy_home=/usr/local/oneproxy

If [-f ${oneproxy_home}/oneproxy.pid]; Then
Kill-9 ' Cat ${oneproxy_home}/oneproxy.pid '
Fi

Sleep 2
# Valgrind--leak-check=full--show-reachable=yes \
${oneproxy_home}/oneproxy--proxy-address=:3307--proxy-extra-address=:3308 \
--proxy-master-addresses=192.168.15.128:3306@default \
--proxy-user-list=test/[email protected] \
--proxy-part-tables=${oneproxy_home}/part.txt \
--proxy-charset=gbk_chinese_ci--proxy-found-rows \
--proxy-group-policy=default:master-only \
--event-threads=6--proxy-group-security=default:0 \
--log-file=${oneproxy_home}/oneproxy.log \
--pid-file=${oneproxy_home}/oneproxy.pid ############################################################ 4. Start sh./demo.sh check the boot output cat oneproxy.log############################# #2015 -05-04 19:38:15: (critic AL) Plugin Oneproxy 5.4.1-20150425 started
2015-05-04 19:38:15: (critical) valid config checksum = 88429892############################## 5. Check the back-end Database node state into the management port (the default port is 4041) mysql-uadmin-poneproxy-p4041--protocol=tcp              After typing list backend; You can see the output as: +------+---------------------+-----------+--------+----------+---------+
| INDX | ADDRESS | TYPE | STATUS | Requests | GROUP |
+------+---------------------+-----------+--------+----------+---------+
| 1 | 192.168.15.128:3306 | Rw/master | up| 0 | Default |
+------+---------------------+-----------+--------+----------+---------+ 6. Add slave node modify configuration file ####################################################/bin/bash
#
Export Oneproxy_home=/usr/local/oneproxy

If [-f ${oneproxy_home}/oneproxy.pid]; Then
Kill-9 ' Cat ${oneproxy_home}/oneproxy.pid '
Fi

Sleep 2
# Valgrind--leak-check=full--show-reachable=yes \
${oneproxy_home}/oneproxy--proxy-address=:3307--proxy-extra-address=:3308 \
--proxy-master-addresses=192.168.15.128:[email protected] \
--proxy-slave-addresses=192.168.15.128:[email protected] \
--proxy-user-list=test/[email protected] \
--proxy-part-tables=${oneproxy_home}/part.txt \
--proxy-charset=gbk_chinese_ci--proxy-found-rows \
--proxy-group-policy=default:master-only \
--event-threads=6--proxy-group-security=default:0 \
--log-file=${oneproxy_home}/oneproxy.log \
--pid-file=${oneproxy_home}/oneproxy.pid################################################### Restart ONEPROXY Sh./demo.sh 7. Check the back-end Database node state method with step 5 output as +------+---------------------+-----------+--------+----------+---------+
| INDX | ADDRESS | TYPE | STATUS | Requests | GROUP |
+------+---------------------+-----------+--------+----------+---------+
| 1 | 192.168.15.128:3306 | Rw/master |        Up | 0 | Default |
| 2 | 192.168.15.128:3310 | Ro/slave |        Up | 0 | Default |
+------+---------------------+-----------+--------+----------+---------+ After seven steps, I believe you will be deploying and simply using our system. This is the end of the article, if you want to find the answer to the question I just raised, please go to this page of our official website (http://www.onexsoft.com/oneproxy/oneproxy-auto-failover) to see.

Oneproxy get started quickly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.