maria_ha_maxscale

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
maria_ha_maxscale [2020/10/23 20:23] andonovjmaria_ha_maxscale [2020/10/24 18:17] (current) – [Testing the Environment] andonovj
Line 18: Line 18:
   * node4   * node4
  
-=====Setting up===== +=====Configuration===== 
-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:+The whole processes will go as follows:
  
 +  - Install MariaDB and Maxscale on all nodes
 +  - Configure Galera Cluster
 +  - Configure Maxscale
 +  - Feature tests
  
 +====Setup Repo====
 <Code:bash|Repo Config> <Code:bash|Repo Config>
 [root@node1 ~]#  curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash [root@node1 ~]#  curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
Line 146: Line 151:
 [root@node4 ~]# service mariadb start [root@node4 ~]# service mariadb start
 Redirecting to /bin/systemctl start mariadb.service Redirecting to /bin/systemctl start mariadb.service
-[root@node4 ~]# service mariadb status 
-Redirecting to /bin/systemctl status mariadb.service 
-● mariadb.service - MariaDB 10.5.6 database server 
-   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) 
-  Drop-In: /etc/systemd/system/mariadb.service.d 
-           └─migrated-from-my.cnf-settings.conf 
-   Active: active (running) since Thu 2020-10-22 17:13:11 UTC; 5s ago 
-     Docs: man:mariadbd(8) 
-           https://mariadb.com/kb/en/library/systemd/ 
-  Process: 23170 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) 
-  Process: 22993 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS) 
-  Process: 22991 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) 
- Main PID: 23042 (mariadbd) 
-   Status: "Taking your SQL requests now..." 
-   CGroup: /system.slice/mariadb.service 
-           └─23042 /usr/sbin/mariadbd --wsrep_start_position=00000000-0000-0000-0000-000000000000:2 
- 
-Oct 22 17:13:11 node4 mariadbd[23042]: 2020-10-22 17:13:11 0 [Note] WSREP: Shifting JOINED -> SYNCED (TO: 5) 
-Oct 22 17:13:11 node4 mariadbd[23042]: 2020-10-22 17:13:11 2 [Note] WSREP: Server node4 synced with group 
-Oct 22 17:13:11 node4 mariadbd[23042]: 2020-10-22 17:13:11 2 [Note] WSREP: Server status change joined -> synced 
-Oct 22 17:13:11 node4 mariadbd[23042]: 2020-10-22 17:13:11 2 [Note] WSREP: Synchronized with group, ready for connections 
-Oct 22 17:13:11 node4 mariadbd[23042]: 2020-10-22 17:13:11 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification. 
-Oct 22 17:13:11 node4 mariadbd[23042]: 2020-10-22 17:13:11 0 [Note] Reading of all Master_info entries succeeded 
-Oct 22 17:13:11 node4 mariadbd[23042]: 2020-10-22 17:13:11 0 [Note] Added new Master_info '' to hash table 
-Oct 22 17:13:11 node4 mariadbd[23042]: 2020-10-22 17:13:11 0 [Note] /usr/sbin/mariadbd: ready for connections. 
-Oct 22 17:13:11 node4 mariadbd[23042]: Version: '10.5.6-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server 
-Oct 22 17:13:11 node4 systemd[1]: Started MariaDB 10.5.6 database server. 
 </Code> </Code>
  
 After that, we can see that the members of the cluster increased: After that, we can see that the members of the cluster increased:
- 
  
 <Code:bash|Cluster members> <Code:bash|Cluster members>
Line 220: Line 197:
 </Code> </Code>
  
-====Configure MaxScale====+====Setup MaxScale====
 The configuration of MaxScale is stored in: "/etc/maxscale.cnf" The configuration of MaxScale is stored in: "/etc/maxscale.cnf"
  
Line 284: Line 261:
 </Code> </Code>
  
-====Test the Connection===+=====Testing the Environment====
 In our test: In our test:
   - We will connect to the listener on the maxscale server   - We will connect to the listener on the maxscale server
Line 303: Line 280:
 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  
-MariaDB [(none)]> show user 
-    -> ; 
-ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'user' at line 1 
 MariaDB [(none)]> show variables like 'hostname'; MariaDB [(none)]> show variables like 'hostname';
 +---------------+-------+ +---------------+-------+
Line 342: Line 316:
 Password: mariadb Password: mariadb
  
-{{ :mariadbmaxscaleoverview.jpg?600 |}}+{{ :mariadbmaxscaleoverview.jpg?800 |}}
  
  • maria_ha_maxscale.1603484605.txt.gz
  • Last modified: 2020/10/23 20:23
  • by andonovj