Windows下MySQL的主从热备(自动同步)配置
2012-07-16 17:53
399 查看
本配置方法适用于5.1之后的版本,个人在5.5上配置成功(5.1之前版本请参考另外的配置说明)
环境说明:Master:192.168.1.200Slave:192.168.1.210
MySQL 的 Master 配置:配置my.ini:
[mysqld]# The TCP/IP Port the MySQL Server will listen onport=3306server-id=200log-bin=mysql-binrelay-log=relay-binrelay-log-index=relay-bin-index
*配置好后,重启Master 的 MySQL服务!!!
//--------------------------------------------------MySQL 的 Slave 配置:配置my.ini:
[mysqld]# The TCP/IP Port the MySQL Server will listen onport=3306server-id = 210replicate-do-db = test
*配置好后,重启Slave 的 MySQL服务!!!//--------------------------------------------------
登录Slave,然后执行下面命令:
mysql> stop slave;mysql> change master to master_host='192.168.1.200',master_user='root',master_password='123456';mysql> start slave;mysql> show slave status\G;
查看这两项是否为YES,yes为正常。Slave_IO_Running: YesSlave_SQL_Running: Yes
环境说明:Master:192.168.1.200Slave:192.168.1.210
MySQL 的 Master 配置:配置my.ini:
[mysqld]# The TCP/IP Port the MySQL Server will listen onport=3306server-id=200log-bin=mysql-binrelay-log=relay-binrelay-log-index=relay-bin-index
*配置好后,重启Master 的 MySQL服务!!!
//--------------------------------------------------MySQL 的 Slave 配置:配置my.ini:
[mysqld]# The TCP/IP Port the MySQL Server will listen onport=3306server-id = 210replicate-do-db = test
*配置好后,重启Slave 的 MySQL服务!!!//--------------------------------------------------
登录Slave,然后执行下面命令:
mysql> stop slave;mysql> change master to master_host='192.168.1.200',master_user='root',master_password='123456';mysql> start slave;mysql> show slave status\G;
查看这两项是否为YES,yes为正常。Slave_IO_Running: YesSlave_SQL_Running: Yes
相关文章推荐
- Windows下MySQL的主从热备(自动同步)配置
- Linux下MySQL的主从热备(自动同步)配置
- Linux下MySQL的主从热备(自动同步)配置
- mysql在windows下主从同步配置
- Windows下的 mysql 5.5主从同步配置
- mysql 5.7 主从同步配置(windows)
- Mysql 配置主从服务自动同步功能
- Windows 下配置mysql主从数据库同步
- Windows下的 mysql 5.5主从同步配置
- 如何在一台windows主机上搭建mysql主从配置
- mysql 5.1.48 在 windows 下 主从配置流程
- Mysql 5.6主从同步配置与解决方案
- MySQL主从同步配置
- Windows下Mysql主从配置(Mysql5.5)
- mysql主从同步复制的配置
- Mysql配置主从同步
- Windows下多个Mysql实例配置主从
- mysql主从同步配置
- centos下MySQL主从同步配置
- MySQL 主主同步配置和主从配置步骤