Uninstall MariaDB without removing databases

I am running MariaDB 10.3 on Ubuntu 20.04. Now MariaDB is not running and one database in it. Can I uninstall the MariaDB 10.3 retaining database? My plan is that install a higher version of MariaDB and get back the existing database. If so, which commands do I have to apply?

1

2 Answers

mysqldump -u [username] -p [DATABASE name] > [backup filename].sql
mysql -u [username] -p [DATABASE name] < [backup filename].sql
1

I got the solution, uninstall MariaDB without deleting databases and reinstall it again.

sudo apt purge "mariadb*" -y
sudo apt autoremove -y
sudo apt-get install mariadb-server mariadb-client

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like