How to completely clean unistall MariaDBGalera Cluster in Linux system redhat centos
Some time we faces issues with MariaDB Galera Cluster installation on Linux machine. If we simply remove Galera Cluster packages and re-install doesn’t fixes the issue, in that case old settings may still exists on server which again affects new install. In that case first uninstall Galera Cluster completely from system and erase all settings of old install. To do the same follow the below settings.
Note: Please do not use below steps if Galera Cluster have any running databases.
Step 1: Uninstall Galera Cluster Packages
First uninstall all the Galera Cluster packages installed on your server
# yum remove MariaDB-Galera-server MariaDB-client rsync galera socat
# yum remove MariaDB-Galera-server MariaDB-client rsync galera socat
Step 2: Remove Galera Cluster Directory
Now we need to remove MySQL data directory from system which by default exists at /var/lib/mysql. If you didn’t find this, It may be changed to some other place, which you can find in my.cnf file with variable datadir. Delete the /var/lib/mysql directory from system but we prefer to rename it to keep a backup of existing files.
# mv /var/lib/mysql /var/lib/mysql_old_backup
Step 3: Remove Galera Cluster config Directory if still exist
After removing Galera Cluster completely, install it again using yum package manager, It will re create mysql directory under /var/lib/.
# mv /etc/my.cnf /etc/my.cnf_old_backup
# mv /etc/my.cnf.d /etc/my.cnf.d_old_backup
After completing above three steps, now you have a fresh MySQL install on your system with new settings.
Step 4: Install Galera Cluster Packages Again
After removing Galera Cluster completely, install it again using yum package manager, It will re create Galera Cluster directory under /var/lib/ and Galera Cluster config under /etc/.
# yum --enablerepo=mariadb -y install MariaDB-Galera-server MariaDB-client rsync galera socat
After completing above three steps, now you have a fresh Galera Cluster install on your system with new settings.
Tidak ada komentar :
Posting Komentar