atlas+keepalive MySQL read-write separation and high availability

Source: Internet
Author: User
Tags install openssl

installation Atlas

RPM-IVH atlas-2.2.el6.x86_64.rpm

installation directory:/usr/local/mysql_proxy/bin boot file the Atlas Management interface uses :

# mysql-u Admin user -P admin password -h127.0.0.1-p Management Port

# mysql-uuser-ppwd-h127.0.0.1-p2345

# View DB Status:mysql> select * from Backends;

/usr/;local/mysql_proxy/conf test.conf configuration file

#admin-sername = AAA Note: The admin port Login to the username instead of accessing mysql 's account mask via Atlas

#admin-password = 123456 management port password

#proxy-backend-addresses = 192.168.20.197:3306 Main library IP Port

#proxy-read-only-backend-addresses = 192.168.20.198:[email protected] from the library IP Port

#pwds = manyushuai:/izxz+0groa= Note: This is the account password for accessing the database via Atlas user name:manyushuai Password: /izxz+0groa= password for encrypted password

Encryption process:Cd/usr/local/mysql-proxy/bin

./encrypt 123456 123456 is the password to encrypt

An encrypted password is generated after execution, and the encrypted password is copied to the configuration file

Mysql Aspect: Note that add users can telnet, two database account password keep

Keepalive Installation

TAR-ZVXF keepalived-1\[1\].1.17.tar.gz

Yum-y Install Kernel-devel

Ln-s/usr/src/kernels/2.6.18-164.el5-i686//usr/src/linux

CD keepalived-1.1.17/

Yum Install openssl-*-y

./configure--prefix=/usr/local/keepalived

Make

Make install

cp/usr/local/keepalived/etc/rc.d/init.d/keepalived/etc/init.d/

cp/usr/local/keepalived/etc/sysconfig/keepalived/etc/sysconfig/

Mkdir-pv/etc/keepalived

cp/usr/local/keepalived/etc/keepalived/keepalived.conf/etc/keepalived/

Ln-s/usr/local/keepalived/sbin/keepalived/sbin/

Service keepalived Restart

keepalived configuration file

# vim/etc/keepalived/keepalived.conf

! Configuration File for Keepalived

Global_defs {

router_id Lvs_devel

}

Vrrp_instance Vi_1 {

State BACKUP

Interface eth0

VIRTUAL_ROUTER_ID # Note The default is to get rid of

Priority # # The higher the value, the greater the priority of the master

Advert_int 1

Authentication {

Auth_type PASS

Auth_pass 1111

}

virtual_ipaddress {

192.168.20.197

}

}


This article is from the "full of Handsome Technology blog" blog, please be sure to keep this source http://manyushuai.blog.51cto.com/8818545/1718120

atlas+keepalive MySQL read-write separation and high availability

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.