1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > maxscale连接mysql_MaxScale实现mysql读写分离 负载均衡

maxscale连接mysql_MaxScale实现mysql读写分离 负载均衡

时间:2019-08-16 16:46:21

相关推荐

maxscale连接mysql_MaxScale实现mysql读写分离 负载均衡

文档地址:/mariadb-corporation/MaxScale/blob/2.1/Documentation/Documentation-Contents.md

1,maxscale安装

下载地址:/MaxScale/2.1.3/centos/7/x86_64/

image.png

wget /MaxScale/2.1.3/centos/7/x86_64/maxscale-2.1.3-1.centos.7.x86_64.rpm

yum list installed | grep maxscale 查看是否安装过maxscale yum remove -y maxscale.x86_64 卸载之前的版本 yum install -y maxscale-2.1.3-1.centos.7.x86_64.rpm 安装rpm包

2,配置文件路径

vim /etc/f 配置文件

/var/log/maxscale/maxscale.log日志文件

maxscale --config=/etc/f---->maxadmin

/usr/share/maxscale/maxscale start / stop/ restart/ reload启动脚本 centos6 /etc/init.d/maxscale

image.png

image.png

image.png

image.png

3,mysql增加用户

添加maxscale监控以及获取user表信息的用户

create user 'maxscale'@'%' identified by 'maxscale';

grant select on mysql.user to 'maxscale'@'%';

grant select on mysql.db to 'maxscale'@'%';

grant select on mysql.tables_priv to 'maxscale'@'%';

grant show databases on . to 'maxscale'@'%';

grant replication client on . to 'maxscale'@'%';

(重点)添加连接maxscale代理的客户端用户。(机器多个ip,都要进行添加, 包括内网ip)

client用户,并增加代理访问db的权限。

grant all privileges on . to 'scaleclient'@'192.168.0.62' identified by 'scaleclient';

grant all privileges on . to 'scaleclient'@'192.168.0.63' identified by 'scaleclient';

登录代理若连不上代理,查看log或者是mysql用户权限配置不正确

image.png

image.png

4,maxadmin登录。

image.png

image.png

5, maxscale

Create the encrypted password using maxkeys and maxpasswd if you want to encrypt the password for the user that access the database servers:

image.png

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。