Score:0

Uninstall MariaDB without removing databases

jp flag

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?

uz flag
Jos
Dump the database (`mysqldump databaseName > file.sql`) , reinstall MariaDB, and import the database (`mysql databaseName < file.sql`). Is that what you need?
Score:0
us flag
mysqldump -u [username] -p [DATABASE name] > [backup filename].sql

mysql -u [username] -p [DATABASE name] < [backup filename].sql
Vimal Kumar Vazhappally avatar
jp flag
MariaDB service is not running because of mysqld.sock problem. MySQL dump command will not work.
Score:0
jp flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.