700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > atlas mysql 数据库同步_atlas+mysql实现主从复制和读写分离(二)

atlas mysql 数据库同步_atlas+mysql实现主从复制和读写分离(二)

时间:2019-09-25 02:36:04

相关推荐

atlas mysql 数据库同步_atlas+mysql实现主从复制和读写分离(二)

1. 安装必要的依赖包yuminstallpkg-configlibevent*gliblua

2. 升级安装autoconf,编译安装automake需要wgetftp:///gnu/autoconf/autoconf-2.69.tar.gz&&tarzxvfautoconf-2.69.tar.gz&&cdautoconf-2.69&&./configure&&make&&makeinstall

3. 升级安装automake,编译安装glib需要wget/gnu/automake/automake-1.13.2.tar.gz&&tarzxvfautomake-1.13.2.tar.gz&&cdautomake-1.13.2&&./configure&&make&&makeinstall

4.安装libffi-devel glibc编译需要yum-yinstalllibffi-devel

5. 编译安装glib,Atlas需要glib-2.0 >= 2.32.0wget/pub/gnome/sources/glib/2.36/glib-2.36.3.tar.xz&&tarxvfglib-2.36.3.tar.xz&&cdglib-2.36.3&&./configureexportPKG_CONFIG_PATH=/usr/bin/pkg-configmake&&makeinstall

6. 下载Atlas rpm包,安装

/Qihoo360/Atlas/releases 下载对应的版本,以centos6.4 x86_64为例rpm-ivhAtlas-2.0.5.el6.x86_64.rpm

7. 链接库文件或者在ld.conf.d中添加库文件echo'/usr/local/mysql-proxy/lib/'>/etc/ld.so.conf.d/mysql-proxy.conf

ldconfig-v

8. 修改配置文件/usr/local/mysql-proxy/conf/f

见/Qihoo360/Atlas/wiki/Atlas%E7%9A%84%E5%AE%89%E8%A3%85

9. 启动停止重启Mysql-proxy/usr/local/mysql-proxy/bin/mysql-proxydstart|stop|restart

10. 测试

mysql -uuser -ppassword -h127.0.0.1 -P3306

其中user@password能登陆到后端的Mysql且写在配置文件中,password用encrypt加密,show processlist 查看一下是不是在slave上,insert一个查看是否插入到master上,并同步到slave上了

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。