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
Step 3
Now, we check the current state of MySQL with the command:
sudo systemctl status mysql
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
Step 5
We enter the letter S to confirm this process:
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
Step 7
After that we are going to remove them from Ubuntu 21.04 with the following command:
sudo apt autoremove
Step 8
We confirm this process with the letter S and at the end we will see the following:
Step 9
Finally, we delete the files from the MySQL directory with the following command:
sudo rm -rf / var / lib / mysql
This is the process to completely remove MySQL from Ubuntu 21.04..