I want to set up database replication on mysql, I can't get it on one, I can't start the slave server. I do everything according to the instructions of this video on phpmyadmin when I try to start a phpmyadmin slave server hangs hopelessly .... Therefore, I want to create two servers and try it manually .
- oneAs far as I know, creating 2 servers on one OS is not possible. The documentation on the link shows the creation of servers on a local computer with a virtual system and using 2 Network Cards / VLAN if I'm not mistaken - Insider
- 2@Insider MySQL documentation doesn’t agree with you: "It’s possible to use mySQL server." - Yaant February
- @Insider is physically impossible. This can be very difficult, but it is impossible to tightly prohibit raising two processes. - etki
1 answer
As one of the options, you can try to start replication on the same IP address and on two different ports, for example, 3306 and 3307. For this, MySQL server has a special port directive, which can be specified either in the my.cnf configuration file in the [mysqld] section
[mysqld] ... port = 3307 or by specifying in the --port parameter when starting the server.
mysqld --port=3307 If the master server gets a non-standard port 3307, in this case, you will have to explicitly specify it in the CHANGE MASTER TO statement.
PS It is better to configure the server manually without resorting to phpMyAdmin, the fact is that the joke replication is quite fragile and can be broken. To restore it, you will need the skill of working on the command line, the sooner you find your hand and understand the basic commands, the easier it will be for you to keep it in operation.