#portsnap fetch extract #cd /usr/ports/ports-mgmt/portmaster #make install clean #portmaster databases/mariadb102-server (make sure to select SSL in the config!!!) #portmaster devel/boost-libs sysutils/lsof net/rsync #portmaster databases/galera #echo mysql_enable="YES" >> /etc/rc.confUPDATE! With the newer releases of mariadb (specially as of freebsd 13.0 with the current ports), galera is included in the mariadb build, so you do not need to install databases/galera anymore.
#nano /usr/local/bin/wsrep_sst_rsync -- look for the line saying: local is_rsync="$(echo $port_info | \ -- grep -w '[[:space:]]\+rsync[[:space:]]\+'"$rsync_pid" 2>/dev/null)" -- replace with: local is_rsync="$(echo "$port_info" | grep -w rsync.*"$rsync_pid" 2>/dev/null)"Then create a my.cnf file in the folder /var/db/mysql
[mysqld] user=mysql default-storage-engine=innodb binlog_format=ROW innodb_autoinc_lock_mode=2 bind-address=0.0.0.0 [galera] wsrep_on=ON wsrep_provider = /usr/local/lib/libgalera_smm.so wsrep_provider_options = "gmcast.segment=1;pc.weight=1" wsrep_cluster_name = "mycluster" wsrep_cluster_address = "gcomm://" wsrep_sst_method = rsync wsrep_node_address="this_node_ip" wsrep_node_name="this_node_name"
mysql_args="--wsrep-on --wsrep-new-cluster"
mysql_db_dir="/var/db/mysql"
SHOW STATUS LIKE 'wsrep_cluster_size' -- or SHOW STATUS LIKE 'wsrep_%'