Uninstallation
Select an uninstallation mode based on your installation mode.
- If MariaDB is installed by compiling the source code, select Uninstalling the Database (Against Source Code Compilation).
- If MariaDB is installed using the RPM package of the mirror site, select Uninstalling the Database (Against RPM Package Installation).
Uninstalling the Database (Against RPM Package Installation)
- Stop the database process.
1 2
ps -ef | grep mysql /usr/local/mariadb/bin/mysqladmin -uroot -p123456 shutdown -S /data/mariadb/run/mysql.sock
or
1kill -9 Database_process_ID

- Exit the mysql user.
1 2 3
whoami exit whoami - Uninstall the RPM package.
1 2 3
rpm -qa | grep mariadb-10.3.9 rpm -e mariadb-10.3.9-1.el8.aarch64 rpm -qa | grep mariadb-10.3.9
- Delete the installation directory and data directory.
1 2 3 4
ll /usr/local/mariadb rm -rf /usr/local/mariadb ll /data rm -rf /data
Uninstalling the Database (Against Source Code Compilation)
- Stop the database process.
1 2
ps -ef | grep mysql /usr/local/mariadb/bin/mysqladmin -uroot -p123456 shutdown -S /data/mariadb/run/mysql.sock
or
1kill -9 process_ID

- Exit the mysql user.
1 2 3
whoami exit whoami - Delete the software installation directory and data directory of the database.
1 2 3 4
ll /usr/local/mariadb ll /data rm -rf /usr/local/mariadb rm -rf /data
Parent topic: Installation Guide