How to understand lightweight middleware mysqlrouter
This article introduces you how to understand lightweight middleware mysqlrouter, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Lightweight middleware released by the official version 5.7. Can do small applications, data consistency requirements are not high read-write separation scheme. The configuration is very simple.
[DEFAULT]
Logging_folder = / usr/local/mysqlrouter [logger]
Level = INFO [routing:failover]
Bind_address = 192.168.6.57
# mysqlrouter server ip
Bind_port = 7001
Mode = read-write
Max_connection = 1024
Destinations = 192.168.6.57 destinations 3306192.168.6.57 3307 [routing:balancing]
Bind_address = 192.168.6.57
Bind_port = 7002
Max_connections = 1024
Mode = read-only
Destination = 192.168.6.57purl 3307192.168.6.57purl 3308
One master and two slaves mode, 3306 configuration master, 3307 as the 3306 failover point, when 3306 downtime, automatically switch to 3307, mysqlrouter alone can not automatically create 3307 mai-> 3308 master-slave.
The default configuration file is here in / root/.mysqlrouter.ini, which can be seen through mysqlrouter-- help
Just start the mysqlrouter execution under bin under mysqlrouter
Landing
Mysql-h10.10.10.10-uroot-P123-P7001
10.10.10.10 is the server IP for mysqlrouter
Mysql-h20.10.10.10-uroot-p123-p7002-e "show variables like 'port'"
-
Mysqlproxy is not yet a Generally Available version. It seems that the authorities don't want to mess with him anymore? Uh...
On how to understand lightweight middleware mysqlrouter to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.