MySQL master-slave in windows
MySQL replication settings
- Set up MySQL replication and control slave thread
MySQL master-slave backup
Recommendation circle: Database circle
For more information, we recommend that you install MySQL
1. install two MySQL instances first, that is, copy a MySQL master-slave instance)
2. Modify the port number and installation address (my. ini). Here we do not use the default port 3306 for main tests.
Xml Code
- 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. Create a backup account in the Master (MySQL5.1) database. The command is as follows:
SQL code
- GRANT REPLICATION SLAVE ON *.* TO 'slave'@'localhost' IDENTIFIED BY '123456';
- GRANT REPLICATION SLAVE ON *.* TO 'slave'@'localhost' IDENTIFIED BY '123456';
-
The above content is an introduction to MySQL master-slave in windows. I hope you will have some gains.