欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

mysql主从同步随笔_MySQL

程序员文章站 2024-02-03 16:02:46
...
bitsCN.com

mysql主从同步随笔

vim /etc/my.cnf

server-id=1

log-bin=/data/binlog/mysql-bin

binlog-ignore-db=mysql

binlog-ignore-db=test

binlog-ignore-db=information_schema

flush tables with read lock;

show master status;

server-id=2

stop slave;

chage master to

master_host=

master_user=

master_password=

master_port=

master_log-file=

master_log_pos=

start slave;

show slave status;

bitsCN.com
相关标签: mysql