温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

mysql如何安装route

发布时间:2021-11-01 15:53:27 来源:亿速云 阅读:315 作者:小新 栏目:MySQL数据库

这篇文章主要为大家展示了“mysql如何安装route”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“mysql如何安装route”这篇文章吧。

mysql route

安装包下载: 
http://dev.mysql.com/downloads/router/ 
文档: 
http://downloads.mysql.com/docs/mysql-router-en.pdf 
二进制安装: 
解压--设置环境变量path即可 


cat /etc/sample_mysqlrouter.ini 

# MySQL Router sample configuration 
# 
# The following is a sample configuration file which shows 
# most of the plugins available and most of their options. 
# 
# The paths used are defaults and should be adapted based 
# on how MySQL Router was installed, for example, using the 
# CMake option CMAKE_INSTALL_PREFIX 
# 
# The logging_folder is kept empty so message go to the 
# console. 
# 
# The fabric_cache plugin only works with the MySQL-RPC 
# protocol (by default running on port 32275) 
# 

#[DEFAULT] 
#logging_folder = 
#plugin_folder = /usr/local/lib/mysqlrouter 
#config_folder = /etc/mysql 
#runtime_folder = /var/run 

#[logger] 
#level = INFO 

#[fabric_cache] 
#address = your_fabric_node.example.com:32275 
#user = 

[routing:basic_failover] 
# To be more transparent, use MySQL Server port 3306 
bind_address=10.10.157.43 --本机的地址 
bind_port = 7001 --本机的端口 
mode = read-write 
destinations = 10.10.224.217:3306 --db的地址及端口 

#[routing:homepage_reads_fabric] 
#bind_port = 7002 
#destinations = fabric+cache:///group/homepage_group?allow_primary_reads=yes 
#mode = read-only 

# 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 

cd /root/mysql-router-2.0.3-linux-glibc2.12-x86-64bit/bin 

mysqlrouter -c /etc/sample_mysqlrouter.ini &

以上是“mysql如何安装route”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI