# Training Video Examples¶

## Installing Galera Cluster with MySQL¶

These examples are part of the training video, Installing Galera Cluster with MySQL. They correspond to what was taught, and should be done after each viewing section, unless otherwise noted.

Before starting these exercises, make sure you have all of the requirements and preparations in place.

Requirements & Preparation

• Test Servers: 3
• Operating System: Linux
• Software: Don’t install MariaDB or Galera Cluster in preparation.

Before starting an exercise, read it fully and carefully. The headings for each set of exercises corresponds to the section with the same name in training video. Make notes for yourself as you go along, for when you have to do these tasks for your job or for yourself.

Database Configuration (/etc/my.cnf)

Do these exercises after viewing the first two sections of the training video: Galera Cluster Overview, and Installing Software on Nodes. Don’t configure the nodes until the next section.

# MySQL Options

[mysqld]
socket=/var/lib/mysql/mysql.sock
user=mysql

default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=0
innodb_buffer_pool_size=128M

binlog_format=ROW

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

# Galera Optons

wsrep_on=ON
wsrep_provider=/usr/lib64/galera-3/libgalera_smm.so

wsrep_node_name='galera-2'

wsrep_cluster_name='galera-training'

Do these exercises after viewing the section with the two titles. MariaDB should be down on each node; don’t start mysqld again until the next section.