Heartbeat high-availability cluster-mysql

Source: Internet
Author: User

192.168.1.210 node1192.168.1.220 node2192.168.1.200 nfs1.200:yum install -y  NFS-UTILSVIM /ETC/EXPORTS/DATA/SHARE 192.168.1.0/24 (Rw,sync,no_root_squash)/etc/init.d/rpcbind  restart;  /etc/init.d/nfs restart210,220:yum install -y nfs-utilsshowmount  -e 192.168.1.200mkdir -p /data/mysqlmount -t nfs 192.168.1.200:/data/share/  /data/mysql/wget mysqltar zxvf mysqlmv mysql-..  /usr/local/mysqlcd /usr/local/mysqlgroupadd -g 27 mysql; useradd -u  27 -g 27 mysqlcp support-files/mysql.server /etc/init.d/mysqld cp  support-files/my-huge.cnf /etc/my.cnfvim /etc/my.cnfskip-innodb#server-id       = 1vim /etc/init.d/mysqlddatabase=/usr/local/mysqldatadir=/data/mysql/./scripts/mysql_ Install_db --user=mysql --datadir=/data/mysql/etc/init.d/mysqld startecho  "path= $PATH:/usr/local/mysql/bin"  >> /etc/profile source /etc /profile210:mysql -uroot -pcreate database db1;service mysqld stop220:ls / Data/mysqlservice mysqld start220:service mysqld stop installation heartbeatnode1&node2:wget  http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-8.noarch.rpmrpm -ivh  Epel-release-6-8.noarch.rpm  yum install -y heartbeat heartbeat-* libnetcd  /usr/share/doc/heartbeat-3.0.4cp authkeys haresources ha.cf /etc/ha.dcd /etc/ Ha.d/node1:vim authkeys Increase AUTH 33 MD5 HELLO!VIM HARESOURCESNODE1 192.168.1.222/24 /eth0:0 mysqldvim ha.cflogfile /var/log/ha.log#bcast eth1ucast eth1  192.168.0.200 each other ipkeepalive 2warntime 10deadtime 30initdead 120udpport 694auto_ Failback onnode node1node node2ping&nbsP;192.168.1.254respawn hacluster /usr/lib/heartbeat/ipfaildebugfile /var/log/ha-debug.logscp  authkeys ha.cf haresources node2:/etc/ha.d/node2:vim ha.cfucast eth1  192.168.0.100 each other Ipchmod 600 authkeys /etc/init.d/heartbeat  start test: 1.220:mysql - uroot -p -h192.168.1.220 -p3306 create database db2;1.210:show databases;


This article is from the "Linux_config" blog, make sure to keep this source http://jialiang1026.blog.51cto.com/10119067/1633857

Heartbeat high-availability cluster-mysql

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.