Coder Social home page Coder Social logo

install-mysql's Introduction

install-mysql

安装mysql(单机、主从、mgr)

前提

修改脚本中的配置参数

单机安装

bash -x ~/install-mysql8.sh

主从安装

# 主库安装,需传输server-id,默认server-id=1
bash -x ~/install-mysql8.sh 1

# 从库安装,需传输server-id,且必须大于主库,如主库没传递参数,此处需大于1
bash -x ~/install-mysql8.sh 2

# 从库执行如下命令配置主从,repl后分别为主库的IP和端口
bash -x ~/install-mysql8.sh repl 192.168.133.151 3306

单主mgr安装

# mgr primary节点安装
bash -x ~/install-mysql8.sh 1

# mgr secondary1节点安装
bash -x ~/install-mysql8.sh 2

# mgr secondary2节点安装
bash -x ~/install-mysql8.sh 3

# 每个mgr节点执行如下命令配置mgr集群
bash -x ~/install-mysql8.sh mgr
bash -x ~/install-mysql8.sh mgr
bash -x ~/install-mysql8.sh mgr

# 查看成员信息
select * from performance_schema.replication_group_members;

install-mysql's People

Contributors

fed0ra avatar

Watchers

 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.