ASP源码.NET源码PHP源码JSP源码JAVA源码DELPHI源码PB源码VC源码VB源码Android源码
当前位置:首页 >> 数据库 >> 其他数据库 >> Linux Mysql 56 主从(Master/Slave)同步配置

Linux Mysql 56 主从(Master/Slave)同步配置(2/4)

来源:网络整理     时间:2018-08-22     关键词:

本篇文章主要介绍了" Linux Mysql 56 主从(Master/Slave)同步配置",主要涉及到方面的内容,对于其他数据库感兴趣的同学可以参考一下: 安装环境:操作系统:CentOS 6.7 64位数据库:mysql 5.6主库(master)IP:192.168.1.91从库(slave)IP:192.16...

log-bin=mysql-bin
server-id=3
binlog-ignore-db=information_schema
binlog-ignore-db=cluster
binlog-ignore-db=mysql
replicate-do-db=test
replicate-ignore-db=mysql
log-slave-updates
slave-skip-errors=all
slave-net-timeout=60

完整配置如下:



注:Mysql5.6 之前版本不能在配置文件中配置master相关配置信息:

master-host=192.168.1.91 #Master的主机IP

master-user=root

master-password=mysql password #MasterMySQL密码

修改my.cnf文件后进入mysql

mysql> stop slave;#关闭Slave

mysql> change master to master_host='192.168.1.91',master_user='root',master_password='123456',master_log_file='mysql-bin.000001', master_log_pos=5;

mysql> start slave;#开启Slave

查看slave

mysql> show slave status \G;

mysql> show slave status \G;

*************************** 1. row ***************************

Slave_IO_State: Waiting for master to send event

Master_Host: 192.168.1.91

Master_User: root

Master_Port: 3306

Connect_Retry: 60

Master_Log_File: mysql-bin.000002

Read_Master_Log_Pos: 120

Relay_Log_File: localhost-relay-bin.000006

Relay_Log_Pos: 283

Relay_Master_Log_File: mysql-bin.000002

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

Replicate_Do_DB: ufind_db,test

Replicate_Ignore_DB: mysql

Replicate_Do_Table:

Replicate_Ignore_Table:

相关图片

相关文章