Transform Galera cluster into single node mariadb server
It's easy. You should gracefully stop all nodes. After this remove all Galera configuration from my.cnf
and start MySQL. Better to do it on latest stopped node, to prevent dataloss.
Related videos on Youtube
Christopher Thonfeld-Guckes
Software-Architekt, Fullstack-Developer, Continuous-Deployment-Spezialist, Linux-Fachmann, Musiker und Hobbyschreiner.
Updated on September 18, 2022Comments
-
Christopher Thonfeld-Guckes over 1 year
We want to get rid of all cluster features on our galera cluster (currently consisting of three virtual machines). The connection between the nodes is not stable enough so the cluster is much slower than our previous single node setup was. Is it possible to just remove two of the nodes and run the single node as a standalone mariadb server or are there repercussions that would justify the time and cost to set up a new database server and transfer all the databases onto the new one? The database currently holds about 150GB of data, so I would like to avoid that, if there are no drawbacks...
-
Christopher Thonfeld-Guckes almost 7 yearsWorked like charm, thanks. On Debian I had to edit /etc/mysql/conf.d/galera.cnf to remove the clustering options.
-
Alexander Tolkachev almost 7 years@ChristopherGuckes you're welcome.
-
Demerit almost 6 yearsThis seemed to work ok, just after restarting there was a message in /var/log/messages that said I should run mysql_upgrade. The output of that seemed ok and the database seemed fine. If I was to do it again I would have read the docs first and run mysql_upgrade with -vvvv to see what if anything it actually changed.