GithubHelp home page GithubHelp logo

read-write-splitting's Introduction

基于https://github.com/sysown/proxysql 的Mysql读写分离方案

使用方法

  1. 执行 build.sh
  2. 用客户端连接slave(port:3001),执行 start slave;show slave status; 查看主从复制状态
  3. 在slave执行SELECT @@global.read_only,如果为read_only=0,执行set global read_only = 1;
  4. 用客户端连接proxsql(port:6033), 执行测试insert/select语句
  5. docker进入镜像proxysql(容器外部无法直接登录admin账号),输入mysql -uadmin -padmin -P6032 -h127.0.0.1,执行select * from stats_mysql_query_digest;,查看SQL语句的分发情况

read-write-splitting's People

Contributors

zhuuvzhi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.