MySQL Router
yum install mysql-router -y# Copyright (c) 2015, 2024, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is designed to work with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have either included with
# the program or referenced in the documentation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# MySQL Router configuration file
#
# Documentation is available at
# http://dev.mysql.com/doc/mysql-router/en/
[DEFAULT]
logging_folder = /var/log/mysqlrouter
runtime_folder = /run/mysqlrouter
config_folder = /etc/mysqlrouter
[logger]
level = INFO
# If no plugin is configured which starts a service, keepalive
# will make sure MySQL Router will not immediately exit. It is
# safe to remove once Router is configured.
[keepalive]
interval = 60
# [routing:myCluster_rw]
# bind_address=0.0.0.0
# bind_port=3311
# destinations=metadata-cache://myCluster/?role=PRIMARY
# routing_strategy=first-available
# protocol=classic
# [routing:myCluster_ro]
# bind_address=0.0.0.0
# bind_port=3312
# destinations=metadata-cache://myCluster/?role=SECONDARY
# routing_strategy=round-robin-with-fallback
# protocol=classic
# [routing:myCluster_rw]
# bind_address=0.0.0.0
# bind_port=3313
# destinations=metadata-cache://myCluster/?role=PRIMARY
# routing_strategy=first-available
# protocol=classic
[routing:myCluster_rw]
bind_address=0.0.0.0
bind_port=3314
destinations=192.168.160.11:3306
routing_strategy=first-available
protocol=classic服务控制
使用
最后更新于