This is an old revision of the document!
Overview
Maxscale is proxy that extends the high availability of MariaDB. MariaDB MaxScale is an advanced database proxy, firewall, and query router. MaxScale is a component of MariaDB Platform. MaxScale is compatible with MariaDB Enterprise Server, MariaDB ColumnStore, and MariaDB Community Server. Let's imagine the following configuration:
- 192.168.10.101 node1
- 192.168.10.102 node2
- 192.168.10.103 node3
- 192.168.10.104 node4
The Cluster will be configured as follows:
Maxscale:
- node1
Galera Cluster:
- node2
- node3
- node4
Setting up
To set up we have to install the packages and configure the repositories. Do that on all nodes in the cluster. In our case on all 4:
Repo Config
[root@node1 ~]# curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash [warning] Found existing file at /etc/yum.repos.d/mariadb.repo. Moving to /etc/yum.repos.d/mariadb.repo.old_1 [info] Repository file successfully written to /etc/yum.repos.d/mariadb.repo [info] Adding trusted package signing keys... [info] Successfully added trusted package signing keys [root@node1 ~]#
Install MariaDB Server
After that we can install the Maria DB
Install MariaDB
[root@node1 ~]# yum -y install MariaDB-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.cvut.cz * extras: ftp.cvut.cz * updates: ftp.cvut.cz mariadb-main | 2.9 kB 00:00:00 mariadb-maxscale | 2.4 kB 00:00:00 mariadb-tools | 2.9 kB 00:00:00 (1/3): mariadb-maxscale/7/x86_64/primary_db | 7.1 kB 00:00:00 (2/3): mariadb-tools/7/x86_64/primary_db | 14 kB 00:00:00 (3/3): mariadb-main/7/x86_64/primary_db | 70 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package MariaDB-server.x86_64 0:10.5.6-1.el7.centos will be installed --> Processing Dependency: perl(DBI) for package: MariaDB-server-10.5.6-1.el7.centos.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: MariaDB-server-10.5.6-1.el7.centos.x86_64 --> Processing Dependency: MariaDB-client for package: MariaDB-server-10.5.6-1.el7.centos.x86_64 --> Processing Dependency: perl(Data::Dumper) for package: MariaDB-server-10.5.6-1.el7.centos.x86_64 --> Processing Dependency: galera-4 for package: MariaDB-server-10.5.6-1.el7.centos.x86_64 --> Processing Dependency: MariaDB-common for package: MariaDB-server-10.5.6-1.el7.centos.x86_64 --> Processing Dependency: lsof for package: MariaDB-server-10.5.6-1.el7.centos.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: MariaDB-server-10.5.6-1.el7.centos.x86_64 Installed: MariaDB-compat.x86_64 0:10.5.6-1.el7.centos MariaDB-server.x86_64 0:10.5.6-1.el7.centos Dependency Installed: MariaDB-client.x86_64 0:10.5.6-1.el7.centos MariaDB-common.x86_64 0:10.5.6-1.el7.centos boost-program-options.x86_64 0:1.53.0-28.el7 galera-4.x86_64 0:26.4.5-1.el7.centos libaio.x86_64 0:0.3.109-13.el7 lsof.x86_64 0:4.87-6.el7 pcre2.x86_64 0:10.23-2.el7 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBI.x86_64 0:1.627-4.el7 perl-Data-Dumper.x86_64 0:2.145-3.el7 perl-IO-Compress.noarch 0:2.061-2.el7 perl-Net-Daemon.noarch 0:0.48-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7 socat.x86_64 0:1.7.3.2-2.el7 Replaced: mariadb-libs.x86_64 1:5.5.60-1.el7_5
Install MariaDB Client
Install MariaDB Client
Install MariaDB Client
[root@node1 ~]# yum -y install MariaDB-client Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.cvut.cz * extras: ftp.cvut.cz * updates: ftp.cvut.cz Package MariaDB-client-10.5.6-1.el7.centos.x86_64 already installed and latest version Nothing to do [root@node1 ~]#