MySQL High-availability architecture MySQL5.6 MHA

Source: Internet
Author: User

[[Email protected] ~] #cd/opt/source/

[[Email protected] ~] #tar-zxf mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz

[[Email protected] ~] #ln-S/OPT/SOURCE/MYSQL-5.6.37-LINUX-GLIBC2.12-X86_64/USR/LOCAL/MHA

[[Email protected] ~] #mkdir-P/data/mysql_33051/{data,logs,run,tmp}

[[Email protected] ~] #vi/data/mysql_33051/my.cnf

[[Email protected] ~] #chown-R mysql.mysql/data/mysql_33051/

[Email protected] ~]#/usr/local/mha/scripts/mysql_install_db--defaults-file=/data/mysql_33051/my.cnf--basedir=/ Usr/local/mha--datadir=/data/mysql_33051/data--user=mysql #初始化实例, the default location of the MY.CNF is not used, the first position is specified when initializing, otherwise it will not be recognized

[Email protected] ~]#/usr/local/mha/bin/mysqld_safe--defaults-file=/data/mysql_33051/my.cnf--user=mysql & # Launch instance

[[Email protected] ~] #ps-ef |grep MySQL
Root 8964 6737 1 15:57 pts/0 00:00:00/bin/sh/usr/local/mha/bin/mysqld_safe--defaults-file=/data/mysql_33051/my.cnf-- User=mysql
MySQL 10435 8964 15:57 pts/0 00:00:04/usr/local/mha/bin/mysqld--defaults-file=/data/mysql_33051/my.cnf--basedir=/ Usr/local/mysql--datadir=/data/mysql_33051/data--plugin-dir=/usr/local/mysql/lib/plugin--user=mysql--log-error =/data/mysql_33051/logs/mysqlerror.log--open-files-limit=65535--pid-file=/data/mysql_33051/run/mysqld.pid-- Socket=/data/mysql_33051/run/mysql.sock--port=33051

MySQL5.6 MHA of MySQL high-availability architecture

Related Article

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.