MySQL Router automatic failover test

Source: Internet
Author: User
Tags failover

[Email protected] bin]# cat/etc/mysqlrouter/Mysqlrouter.ini[default]
#mkdir-P/var/log/mysql-routerlogging_folder= /var/log/mysql-router plugin_folder =/usr/local/mysql-router/lib/ mysqlrouterruntime_folder=/usr/local/mysql-router[logger]# defining log levels Level=info# a highly available label [Routing:failover]bind_address=0.0.0.0Bind_port=7001max_connections=1024x768# There are two types of support: Read-write and read-only# Read-write: For high availability, for readable writable # read-only: For load balancing, read-only mode= read-write# the address actually forwarded # The first socket will always use the first if it is available # if the first socket fails to connect, it will connect to the second socketdestinations=10.24.220.70:3306,10.169.214.33:3306
Starting:


[Email protected] bin]#/mysqlrouter-c/etc/mysqlrouter/mysqlrouter.ini &[1]1203[email protected] bin]# Logging to/var/log/mysql-router/Mysqlrouter.log^C[[email protected] bin]# cat Logging to/var/log/mysql-router/mysqlrouter.logcat:Logging:No such file or directorycat:to:No such file or directory .- to- - A: -: GenevaINFO [7f2cb44a4700] [routing:failover] listening on0.0.0.0:7001; read-Write .- to- - A: -: atINFO [7f13125a2700] [routing:failover] listening on0.0.0.0:7001; read-Write .- to- - A: -: atINFO [7f2816b4a700] [routing:failover] listening on0.0.0.0:7001; read-Write .- to- - A: at:WuyiINFO [7fec2b5f4700] [routing:failover] listening on0.0.0.0:7001; read-Write .- to- - A: -:GenevaINFO [7ff971019700] [routing:failover] listening on0.0.0.0:7001; read-write[[email protected] bin]# MySQL-U root-p123-h172.18.14.68^cp7002-E"Show variables like ' server_id '";

[Email protected] bin]# mysql-u root-p-H10.169.216.172-P7001-E"Show variables like ' server_id '"; Enter Password:+---------------+-------+| variable_name | Value |+---------------+-------+| server_id |101|+---------------+-------+[[email protected] bin]# MySQL-U root-p-H10.169.216.172-P7001-E"Show variables like ' server_id '"; Enter Password:+---------------+-------+| variable_name | Value |+---------------+-------+| server_id |101|+---------------+-------+


Server1:
Service Mysq.server Stop


[[email protected] bin]# MySQL-U root-p-H10.169.216.172-P7001-E"Show variables like ' server_id '"; Enter Password:+---------------+-------+| variable_name | Value |+---------------+-------+| server_id |102|+---------------+-------+[[email protected] bin]# MySQL-U root-p-H10.169.216.172-P7001-E"Show variables like ' server_id '"; Enter Password:+---------------+-------+| variable_name | Value |+---------------+-------+| server_id |102|+---------------+-------+

MySQL Router automatic failover test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.