windows下MySQL master-slave
MySQL 复制设置
- Set up MySQL replication and control slave thread
MySQL主从备份
推荐圈子: Database圈子
更多相关推荐 假设安装过一个MySQL
1.先安装2个MySQL 其实也就是复制一个MySQL master-slave)
2.修改端口号和安装地址(my.ini) 这里我们不使用默认端口3306 主要测试
Xml代码
- MySQL5.1
- [client]
- port=3307
- [MySQLd]
- port=3307
- basedir="E:/MySQL5.1/"
- datadir="E:/MySQL5.1/Data/"
- MySQL5.2
- [client]
- port=3308
- [MySQLd]
- port=3308
- basedir="E:/MySQL5.2/"
- datadir="E:/MySQL5.2/Data/"
- MySQL5.1
- [client]
- port=3307
- [MySQLd]
- port=3307
- basedir="E:/MySQL5.1/"
- datadir="E:/MySQL5.1/Data/"
- MySQL5.2
- [client]
- port=3308
- [MySQLd]
- port=3308
- basedir="E:/MySQL5.2/"
- datadir="E:/MySQL5.2/Data/"
3.在Master(MySQL5.1)的数据库中建立一个备份帐户,命令如下
Sql代码
- GRANT REPLICATION SLAVE ON *.* TO 'slave'@'localhost' IDENTIFIED BY '123456';
- GRANT REPLICATION SLAVE ON *.* TO 'slave'@'localhost' IDENTIFIED BY '123456';
以上的相关内容就是对windows下MySQL master-slave的介绍,望你能有所收获。
【编辑推荐】