OPTIMIZE tables in galera cluster

Updated at by

Comment out wsrep_provider in /etc/my.cnf, add skip-networking to prevent clients from connecting and restart MariaDB.

# wsrep_provider=/usr/lib64/galera/libgalera_smm.so
skip-networking

Default behaviour for mysqlcheck and OPTIMIZE TABLE is to write the statement to binlog. PIT recovery might be more fun with those included, but I rather not have them. So either

# mysqlcheck -o --skip-write-binlog woofwoof muchdata

or

MariaDB [woofwoof]> OPTIMIZE NO_WRITE_TO_BINLOG TABLE muchdata;

Revert changes to /etc/my.cnf and restart MariaDB.


Share on FacebookShare on Facebook Share on TwitterShare on Twitter

Leave a comment