Differences between revisions 7 and 15 (spanning 8 versions)
Revision 7 as of 2018-01-20 18:37:25
Size: 540
Comment:
Revision 15 as of 2018-01-20 22:01:48
Size: 1479
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
[[Mariadb Server|servers]] then continue by adding [[Mariadb Encryption|encryption]].
Line 14: Line 16:
apt-get install mariadb-server apt-get install mariadb-server rsync
Line 19: Line 21:
Set the mariadb root password.
{{{
mysql_secure_installation
}}}

Stop mariadb on all nodes.
{{{
service mariadb stop
}}}

Add the configuration for galera to `/etc/mysql/conf.d/galera.cnf`. Replace names so they fit the current node.
{{{
[galera]
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_address=gcomm://mariadb01,mariadb02,mariadb03
wsrep_node_address=mariadb01
wsrep_node_name=mariadb01.kallenberg.dk
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
wsrep_cluster_name="mariadb_galera"
wsrep_sst_method=rsync
bind-address=0.0.0.0
}}}

On the first node the cluster is started.
{{{
galera_new_cluster
}}}

On additional nodes the service is started.
{{{
service mariadb start
}}}
Line 22: Line 60:
 * http://galeracluster.com/documentation-webpages/sslcert.html

incomplete, do not use!

Mariadb

What we really want to set up is a galera cluster. We will use 3 systems for this

servers then continue by adding encryption.

  • 192.168.1.55 mariadb01
  • 192.168.1.56 mariadb02
  • 192.168.1.57 mariadb03

Software

apt-get install mariadb-server rsync

Configuration

Set the mariadb root password.

mysql_secure_installation

Stop mariadb on all nodes.

service mariadb stop

Add the configuration for galera to /etc/mysql/conf.d/galera.cnf. Replace names so they fit the current node.

[galera]
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_address=gcomm://mariadb01,mariadb02,mariadb03
wsrep_node_address=mariadb01
wsrep_node_name=mariadb01.kallenberg.dk
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
wsrep_cluster_name="mariadb_galera" 
wsrep_sst_method=rsync
bind-address=0.0.0.0

On the first node the cluster is started.

galera_new_cluster

On additional nodes the service is started.

service mariadb start

References

None: Mariadb (last edited 2020-02-03 17:13:54 by Kristian Kallenberg)