Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghi chép thô cách cài đặt MaxScale trên CentOS 7 cho MariaDB #1

Open
hoangdh opened this issue May 18, 2017 · 0 comments
Open

Comments

@hoangdh
Copy link
Owner

hoangdh commented May 18, 2017

Cau hinh maxscale tren CentOS 7

  • Tren Galera, them user:

Quan tri tu xa

CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
FLUSH PRIVILEGES;

User cho maxscale

CREATE USER 'maxscale'@'%' IDENTIFIED BY 'you-password-here';
GRANT SELECT ON mysql.db TO 'maxscale'@'%';
GRANT SELECT ON mysql.user TO 'maxscale'@'%';
GRANT SHOW DATABASES ON *.* TO 'maxscale'@'%';
  • Cai dat
wget https://downloads.mariadb.com/MaxScale/latest/centos/7/x86_64/maxscale-2.0.5-1.centos.7.x86_64.rpm

yum install -y maxscale-*

Cau hinh

mv /etc/maxscale.cnf /etc/maxscale.cnf.bk

vi /etc/maxscale.cnf

Noi dung file cau hinh

[maxscale]
threads=4
syslog=0
maxlog=1
log_to_shm=1
log_warning=1
log_notice=1
log_info=0
log_debug=0

[Galera Monitor]
type=monitor
module=galeramon
servers=server1,server2,server3
user=maxscale
passwd=you-password-here
monitor_interval=2000
disable_master_failback=1
available_when_donor=1

[qla]
type=filter
module=qlafilter
options=/tmp/QueryLog

[fetch]
type=filter
module=regexfilter
match=fetch
replace=select

[RW Split Router]
type=service
router=readwritesplit
servers=server1,server2,server3
user=maxscale
passwd=you-password-here
max_slave_connections=100%
max_slave_replication_lag=30

[CLI]
type=service
router=cli

[RW Split Listener]
type=listener
service=RW Split Router
protocol=MySQLClient
port=3306

[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
address=127.0.0.1
port=6603

[server1]
type=server
address=192.168.100.140
port=3306
protocol=MySQLBackend

[server2]
type=server
address=192.168.100.141
port=3306
protocol=MySQLBackend

[server3]
type=server
address=192.168.100.142
port=3306
protocol=MySQLBackend

Tham khảo:

https://linoxide.com/cluster/configure-mariadb-maxscale-galera-cluster/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant