1 Star 0 Fork 8

or22/centos6-optimization

forked from Mocos/centos6-optimization 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mysql主从备份.txt 815 Bytes
一键复制 编辑 原始数据 按行查看 历史
Mocos 提交于 2014-02-24 10:40 . init
两台机器:
master:192.168.76.7
slave :192.168.76.10
106.186.18.145
106.186.124.30
master、slave 所有的数据都一致
master:
mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'106.186.124.30' IDENTIFIED BY '123456repl';
mysql> flush privileges;
# master
server-id = 1
binlog-do-db = wap
binlog-ignore-db = mysql,information_schema,performance_schema,test
restart master
show master status\G;
# slave
server-id = 2
replicate-do-db = wap
replicate-ignore-db = mysql,information_schema,performance_schema,test
restart slave
slave上指定master为主:
mysql> CHANGE MASTER TO MASTER_HOST='106.186.18.145', MASTER_USER='repl', MASTER_PASSWORD='123456repl';
mysql> START SLAVE;
show slave status\G;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/or22/centos6-optimization.git
git@gitee.com:or22/centos6-optimization.git
or22
centos6-optimization
centos6-optimization
master

搜索帮助