Giter Site home page Giter Site logo

mysql_install's Introduction

mysql_install - 适用于生产环境单实例快速部署

MySQL8.0 自动安装脚本

mysql8_install.sh(执行前修改一下脚本里的配置参数,改成你自己的)

my_test.cnf(这个是模板文件,基本上不用改,mysql8_install.sh脚本执行的时候会自动替换里面的port,server_id,innodb_buffer_pool_size等)

mysql-8.0.32-linux-glibc2.12-x86_64.tar.xz

shell> wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.32-linux-glibc2.12-x86_64.tar.xz

三个文件放在同一个目录下,例如/root/soft/


Centos8 注意事项

shell> yum install jemalloc -y

内存管理器jemalloc库文件名字已经变更,需要建立一个软连接

shell> ln -s /usr/lib64/libjemalloc.so.2 /usr/lib64/libjemalloc.so


1)安装并启动mysql进程(主和从库都执行)

shell> /bin/bash mysql8_install.sh

注:my.cnf配置文件默认在/etc/目录下,文件名是以你的数据库名命名,例my_test.cnf,mysql.sock在/tmp目录下。

数据存放在/data/mysql/目录下。

2)配置主从复制(从库执行)

shell> /bin/bash mysql8_install.sh repl

3)配置组复制(先在Primary节点上执行,再到Secondary节点上执行)

注:先把3个节点MySQL实例启动后再开始搭建mgr,同时修改脚本里的ip地址和端口和hosts对应的主机名和地址

shell> /bin/bash mysql8_install.sh mgr

image

注:配置成功后,会在data数据目录下生成mysqld-auto.cnf配置文件。

mysql_install's People

Contributors

hcymysql 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.