日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

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

發布時間:2025/5/22 数据库 50 豆豆
生活随笔 收集整理的這篇文章主要介紹了 atlas mysql 数据库同步_atlas+mysql实现主从复制和读写分离(二) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1. 安裝必要的依賴包yum?install?pkg-config?libevent*?glib?lua

2. 升級安裝autoconf,編譯安裝automake需要wget?ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz?&&?tar?zxvf??autoconf-2.69.tar.gz?&&?cd?autoconf-2.69?&&??./configure?&&?make?&&?make?install

3. 升級安裝automake,編譯安裝glib需要wget?http://ftp.gnu.org/gnu/automake/automake-1.13.2.tar.gz??&&??tar?zxvf??automake-1.13.2.tar.gz??&&?cd?automake-1.13.2?&&??./configure?&&?make?&&?make?install

4.?安裝libffi-devel ?glibc編譯需要yum?-y?install?libffi-devel

5. 編譯安裝glib,Atlas需要glib-2.0 >= 2.32.0wget?http://ftp.gnome.org/pub/gnome/sources/glib/2.36/glib-2.36.3.tar.xz?&&?tar?xvf?glib-2.36.3.tar.xz?&&?cd?glib-2.36.3?&&?./configureexport?PKG_CONFIG_PATH=/usr/bin/pkg-configmake?&&?make?install

6. 下載Atlas rpm包,安裝

https://github.com/Qihoo360/Atlas/releases ?下載對應的版本,以centos6.4 x86_64為例rpm?-ivh?Atlas-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/test.cnf

見https://github.com/Qihoo360/Atlas/wiki/Atlas%E7%9A%84%E5%AE%89%E8%A3%85

9. 啟動停止重啟Mysql-proxy/usr/local/mysql-proxy/bin/mysql-proxyd?start|stop|restart

10. 測試

mysql -uuser -ppassword -h127.0.0.1 -P3306

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

總結

以上是生活随笔為你收集整理的atlas mysql 数据库同步_atlas+mysql实现主从复制和读写分离(二)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。