+5 votes
60 views
Uninstall MySQL on Ubuntu 20.04

in Linux/Unix by (313k points)
reopened | 60 views

1 Answer

+3 votes
Best answer

MySQL has been developed as a free database administration system which is installed on the LAMP stack (Linux, Apache, MySQL, PHP / Python / Perl), being one of the most popular languages ​​since it implements the relational model by doing use of SQL (Structured Query Language) for everything that has to do with data management..

 

It is possible that at some point we want to remove MySQL from Ubuntu if we no longer work with the databases or simply if we have decided to use another platform, so TechnoWikis will explain how to uninstall it completely.

 

 

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

 

 

How to uninstall MySQL in Ubuntu 20.04

 

Step 1

The first step to take will be to know the version of the system used, for this we go to the terminal and execute the following:
 lsb_release -a 
image

 

 

Step 2

After this we are going to check the current state of MySQL, for this we will use the following command:
 sudo systemctl status mysql 
image

 

 

Step 3

We can verify that its status is "Active (running)", that is, it is active and running at the moment.
To uninstall MySQL and all its packages we are going to execute the following command:
 sudo apt-get remove --purge mysql-server mysql-client mysql-common 
image

 

 

Step 4

We enter the letter S to confirm the task of uninstalling MySQL in Ubuntu 20.04:

 

image

 

 

Step 5

After this we are going to clean the packages associated with the following command:
 sudo apt-get autoclean 
image

 

 

Step 6

In addition, we can apply the automatic elimination of these:
 sudo apt-get autoremove 
image

 

Step 7

By default, MySQL stores the data files in the / var / lib / mysql directory, to eliminate these, we are going to use the following command with which we eliminate this information:
 sudo rm -rf / var / lib / mysql 
image

 

With this we have completely uninstalled MySQL from Ubuntu 20.04..

 


by (1.9m points)

Related questions

+4 votes
1 answer
asked Sep 30 in Linux/Unix by backtothefuture (313k points) | 29 views
+3 votes
1 answer
asked Sep 29 in Linux/Unix by backtothefuture (313k points) | 184 views
+3 votes
1 answer
asked Aug 4 in Linux/Unix by backtothefuture (313k points) | 108 views
+5 votes
1 answer
asked Oct 6 in Linux/Unix by backtothefuture (313k points) | 109 views
+4 votes
1 answer
asked Sep 29 in Linux/Unix by backtothefuture (313k points) | 85 views
Please leave a comment about whether the solution works or not (with device model)   [X]Close
5,982 questions
6,072 answers
183 comments
2 users