+3 votes
424 views
Uninstall MySQL on Ubuntu 21.04 | Completely

in Databases by (551k points)
reopened | 424 views

1 Answer

+4 votes
Best answer

How to completely uninstall MySQL in Ubuntu 21.04

MySQL is one of the most popular programming languages ​​for all its built-in functions for managing the data to be worked on, MySQL is installed within the LAMP group (Linux, Apache, MySQL, PHP / Python / Perl), and it is a language based in the relational model of SQL (Structured Query Language). With MySQL we can manage our database based on open code and through a relational type structure..

 

MySQL has become a more widespread database management system that is quite attractive to developers. If for any reason we want to uninstall MySQL from Ubuntu 21.04 for multiple reasons, we can do so by following a series of steps that TechnoWikis explains in detail.

 

 

To stay up to date, remember to subscribe to our YouTube channel!   SUBSCRIBE

 

 

How to completely uninstall MySQL in Ubuntu 21.04

 

Step 1

The first step we will take is to check that we are using Ubuntu 21.04, for this we go to the terminal and execute:
 lsb_release -a 
image

 

 

Step 3

Now, we check the current state of MySQL with the command:
 sudo systemctl status mysql 
image

 

 

Step 4

Its current state is "active (running)" which means that it is running, we uninstall MySQL and all its associated packages with the following command:
 sudo apt remove --purge mysql-server mysql-client mysql-common 
image

 

 

Step 5

We enter the letter S to confirm this process:

 

image

 

 

Step 6

After this, with the following command we will clean the packages that have remained as a result of the uninstallation:
 sudo apt autoclean 
image

 

 

Step 7

After that we are going to remove them from Ubuntu 21.04 with the following command:
 sudo apt autoremove 
image

 

 

Step 8

We confirm this process with the letter S and at the end we will see the following:

 

image

 

 

Step 9

Finally, we delete the files from the MySQL directory with the following command:
 sudo rm -rf / var / lib / mysql 
image

 

This is the process to completely remove MySQL from Ubuntu 21.04..

 


by (3.5m points)

Related questions

+5 votes
1 answer
asked Nov 6, 2020 in Android by backtothefuture (551k points) | 690 views
+5 votes
1 answer
asked Sep 21, 2020 in Linux / Unix by backtothefuture (551k points) | 720 views
+5 votes
1 answer
asked Sep 30, 2019 in Databases by backtothefuture (551k points) | 1.6k views
+5 votes
1 answer
asked May 8, 2021 in Linux / Unix by backtothefuture (551k points) | 314 views
+5 votes
1 answer
asked Oct 15, 2019 in Linux / Unix by backtothefuture (551k points) | 269 views
Sponsored articles cost $40 per post. You can contact us via Feedback
10,632 questions
10,764 answers
510 comments
3 users