How to Completely Delete MySQL From Windows? All Versions
Approved By
Anuraag Singh
Published On
December 9th, 2024
Reading Time
4 Minutes Reading
Summary: Whenever we are managing MySQL on our Windows system, it’s essential for optimal performance. As, it can especially affect your system when the upgrade and reinstallation process is required. So, this guide will explain to you how to uninstall MySQL from Windows 10 or 11 completely using various manual solutions and expert approaches. Also, if you are looking to remove other applications, you can read this manual guide on how to uninstall Google Chrome.
Reasons to Remove MySQL From Windows System
There are several findings as to why we need to uninstall MySQL from Windows system. Let’s cover these points.
- You can install a newer version without any software issues.
- It can fix your corrupted file installation problem and delete any incomplete or pending one.
- By uninstalling, it made it easier to switch to a different database system without any trouble.
- Removing the software or resources which are not used from a long way can boost the overall performance of your systems.
How to Uninstall MySQL From Windows 11 or 10 Using Manual Methods
Let me tell you if you want to remove MySQL from Windows. Then, it is way simple to do it. Just follow these steps carefully with images provided for clarity purposes.
Step 1. Firstly, open Windows Settings via the gear icon in the Start menu or by pressing Win + I.
Step 2. In the settings Window, you need to go to Apps and use the search bar to find “MySQL“.
Step 3. Then, locate MySQL-related programs (e.g., MySQL Server, Workbench, Connector, Shell) and uninstall them.
Step 4. After the process of uninstallation is done, delete the MySQL folder in C:\Program Files.
Step 5. If the folder is hidden, go to the View tab, tick Hidden items checkbox.
Step 6. At last, open the command prompt to verify the uninstallation process if an error appears, and the process is completed.
Note: Type MySQL – -version command in cmd to check that your MySQL file is completely deleted from your system or not.
How to Completely Delete MySQL From Windows? One Click Fully Wipe
If you want to uninstall MySQL from Windows, following the manual solution often comes with some drawbacks and human errors and chances of having residual files after the process which can have the risk of security and takes extra space. To avoid this, you can use SysTools Data Wipe Software for complete removal and thorough deletion of configuration files, databases, and logs.
Simple Steps to Uninstall MySQL From Windows – Automated Tool
Follow this quick steps mentioned below to completely delete MySQL files from your system. To free up your space and have a smooth operation throughout your work.
Step 1. Open SysTools Data Wipe from the Start menu by right-clicking.
Step 2. Next, click “Add File” or “Add Folder” as per your comfort.
Step 3. Select the folder to wipe. Generally found at C:\ProgramData\MySQL\MySQL Server <version>\Data\ and click Next to scan.
Step 4. Choose a wiping method.
Step 5. Click Wipe to begin the process.
Step 6. Now, view the wiped file/folder details on the screen.
Final Verdict
In this write up, we have understood the reasons and how to uninstall MySQL from Windows 10/11 using a manual & professional method. Following these steps will completely remove MySQL and its leftover files. If you plan to reinstall MySQL, it will ensure no conflicting files remain for a smooth setup. This will help prevent errors and improve system performance.
By Mohit Jha
With 5+ years of experience, Mohit is a Microsoft Certified expert known for his cloud migration, cyber security, and digital forensics expertise. He specializes in Microsoft 365, Exchange Server, and Azure AD migration, ensuring seamless transitions for organizations worldwide. His multifaceted role as a meticulous tech writer, diligent researcher, and astute editor underscores his commitment to delivering cutting-edge digital forensics and cloud migration strategies.
View all of Mohit Jha’s posts.
Uninstalling MySQL from Windows 10 involves a few straightforward steps. First, you need to stop the MySQL service, then uninstall the MySQL server, and finally remove any remaining MySQL files. This process ensures a clean removal of MySQL from your system, freeing up resources and preventing potential conflicts with other software.
In this section, we’ll guide you through the steps to completely remove MySQL from your Windows 10 machine. Follow these steps, and you’ll have MySQL uninstalled in no time.
Step 1: Stop the MySQL Service
First, open the Services application by typing «services.msc» in the Windows search bar and pressing Enter.
Stopping the MySQL service before uninstalling it ensures that the process goes smoothly. In the Services window, scroll down to find «MySQL.» Right-click on it and select «Stop.» This action will stop the MySQL service, preventing it from running in the background and causing any issues during the uninstallation process.
Step 2: Uninstall MySQL via Control Panel
Next, open the Control Panel, go to «Programs and Features,» and find «MySQL Server.»
In the Control Panel, click on «Uninstall a program» under the «Programs» category. Locate «MySQL Server» in the list of installed programs. Click on it and then click «Uninstall.» Follow the prompts to complete the uninstallation process. This will remove the main MySQL application from your system.
Step 3: Remove MySQL Data Directory
Navigate to the folder where MySQL data is stored, typically «C:ProgramDataMySQL.»
Open File Explorer and go to «C:ProgramDataMySQL.» If you can’t see the «ProgramData» folder, you might need to enable the display of hidden items. To do this, click on the «View» tab in File Explorer and check the «Hidden items» box. Delete the «MySQL» folder to remove any remaining data files associated with MySQL.
Step 4: Clean Up the Windows Registry
To ensure that all traces of MySQL are gone, you need to delete MySQL entries in the Windows Registry.
Press «Win + R» to open the Run dialog box, type «regedit,» and press Enter to open the Registry Editor. Navigate to «HKEY_LOCAL_MACHINESOFTWAREMySQL AB» and delete the folder. Be cautious while editing the registry; deleting the wrong entries can harm your system.
Step 5: Restart Your Computer
Finally, reboot your computer to ensure all changes take effect.
A restart helps to refresh the system and apply any changes made during the uninstallation process. This step ensures that any background processes related to MySQL are completely stopped.
After completing these steps, MySQL should be fully uninstalled from your Windows 10 machine. Your system will no longer have MySQL running, freeing up resources and avoiding any potential conflicts with newly installed programs.
Tips for How to Uninstall MySQL in Windows 10
- Always back up your data before uninstalling MySQL to prevent accidental data loss.
- Ensure all MySQL-related services are stopped before proceeding with the uninstallation.
- Use a reliable registry cleaner tool if you’re not comfortable editing the registry manually.
- Check for any dependent applications that might be affected by uninstalling MySQL.
- Consider creating a system restore point before starting the uninstallation process to have a fallback.
Frequently Asked Questions
What happens to my databases after I uninstall MySQL?
If you did not back up your data before uninstalling, your databases will be lost. Always back up your data.
Is it safe to delete the Windows Registry entries for MySQL?
Yes, but be very careful. Only delete the specific MySQL entries to avoid harming your system.
Can I reinstall MySQL after uninstalling it?
Absolutely. You can download and install MySQL again from the official website.
What if I can’t find the MySQL service in the Services application?
It might not be installed correctly. Try reinstalling MySQL first, then follow the uninstallation steps.
Do I need to uninstall MySQL Workbench separately?
Yes, MySQL Workbench needs to be uninstalled separately via the Control Panel.
Summary
- Stop the MySQL Service
- Uninstall MySQL via Control Panel
- Remove MySQL Data Directory
- Clean Up the Windows Registry
- Restart Your Computer
Conclusion
Uninstalling MySQL in Windows 10 is a straightforward process if you follow the steps carefully. By stopping the service, removing the application via the Control Panel, deleting the data directory, and cleaning up the registry, you can ensure a clean removal of MySQL from your system.
Taking these steps not only helps in freeing up system resources but also prevents any conflicts with future software installations. Remember to back up your data and be cautious while editing the registry.
If you ever need to reinstall MySQL, you know the process and can do it without any leftover files causing issues. This guide should help you remove MySQL confidently and efficiently, ensuring your computer runs smoothly.
Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.
Read his full bio here.
Follow the steps to uninstall MySQL Completely from Windows:
NOTE: This method will remove/clean all MySQL databases and instances, so keep backup before going through this process, to save your existing databases.
1. First, Run Command Prompt as Administrator and execute the following command to STOP and REMOVE MySQL service.
> Net stop MySQL
> Sc delete MySQL
2. Now Go to Control Panel >> Programs >> Programs and Features, Select MySQL Server 5.x and click Uninstall. (If you uninstall MySQL from Control Panel)
3. Open Windows Explorer and go to Organize > Folder and search options, Select the “View” tab and under “Hidden files and Folders” choose “Show hidden files and folders”. Now go to following locations and delete MySQL folder from all locations.
C:/Program Files/MySQL
C:/Program Files (x86)/MySQL
C:/ProgramData/MySQL
C:/Users[User-Name]/AppData/Roaming/MySQL (if exists, delete it too)
4. Restart your PC and reinstall MySQL. That’s all!
Applicable for :
Windows 7/8/10 (32bit & 64bit)
Windows Server 2008 R2
Windows Server 2008
Windows Vista
Home » KB » Databases » MySQL » How to Uninstall MySQL in Linux, Windows, and macOS
MySQL is an open-source relational database management system (RDBMS) available on Linux, Solaris, macOS, Windows, and FreeBSD. Sometimes, uninstalling the software and a fresh installation is the best solution for resolving bugs, or for fixing compatibility purposes.
In this tutorial, you will learn how to uninstall MySQL on Linux, Windows, and macOS.
Prerequisites
- MySQL installed on Linux, Windows, or macOS system.
- A user account with administrator privileges.
How to Uninstall MySQL {on Linux, Windows, and macOS}?
Depending on the operating system, the process of uninstalling MySQL is different. The sections below show how to uninstall MySQL on Linux, Windows, and macOS, and delete all the associated data.
Uninstall MySQL on Linux
Uninstall MySQL from Linux using the distribution’s default package manager, and the rm command to delete the leftover data. In this tutorial, we will work on Ubuntu, but the instructions for other distros are provided as well.
Follow the steps below:
1. Open a terminal window (Ctrl + Alt + T) and stop the MySQL service and all the related processes. Run the following commands:
sudo service mysql stop
sudo killall -KILL mysql mysqld_safe mysqld
3. Depending on the Linux distribution and package manager you are using, run one of the following commands to uninstall MySQL:
- CentOS, Rocky Linux, and RedHat:
sudo yum remove mysql-client mysql-server -y
- Ubuntu and Debian:
sudo apt remove mysql-client mysql-server -y
Run autoremove
and autoclean
to remove unnecessary packages and clean up the package cache:
sudo apt autoremove -y
sudo apt autoclean -y
- Fedora:
sudo dnf remove mysql-client mysql-server -y
4. After uninstalling MySQL, the next step is to remove residual data. If you still need the data, make a backup before removing it, or rename the directory.
Rename the /var/lib/mysql directory to keep the data if you ever need it again in the future:
sudo mv /var/lib/mysql /var/lib/mysql_directory_backup
Alternatively, remove MySQL-related directories by running:
sudo rm -rf /etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql /var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld
5. Remove the mysql
user and delete the mysql
group, if it exists. Run:
sudo deluser --remove-home mysql
sudo delgroup mysql
After completing the steps above, you have successfully uninstalled MySQL from your Linux system.
Uninstall MySQL on Windows
Follow the steps below to uninstall MySQL from a Windows operating system:
1. Press the Windows key and search for command prompt. Run the app as administrator.
2. Stop the running MySQL server before uninstalling it. The easiest way to stop it is by using the mysqladmin
command which was installed automatically during the MySQL installation. In the command prompt, navigate to the bin folder of the MySQL installation directory. For example, the default path is:
cd C:\Program Files\MySQL\MySQL Server 8.0\bin
After navigating into that path, stop the running server by executing:
mysqladmin -u root -p shutdown
The command asks you for the password and shuts down the running server after confirming it.
3. Next, open the Control Panel. Press the Windows key and search for control panel. Press Enter to open the app.
4. Open Programs and Features. In the list of installed programs, locate MySQL and all related programs. Click each one individually and select the Uninstall option.
Click Yes for each prompt and wait for the wizard to finish.
5. After uninstalling all MySQL components, delete the remaining data directories. Since one of the directories is hidden, make sure to enable the Hidden items option in folder settings.
To do so, open any folder using File Explorer, click the View tab, and check the Hidden items option:
Important: If there is critical data that you may still need, make sure to backup MySQL databases before deleting them.
The directories that you need to remove are:
- C:\Program Files\MySQL
- C:\Program Files (x86)\MySQL
- C:\ProgramData\MySQL
- C:\Users\[YourUsername]\AppData\Roaming\MySQL
6. After you uninstall all the components and delete the remaining directories, restart the computer for the changes to take effect.
Uninstall MySQL on macOS
Follow the steps below to uninstall MySQL on a macOS system:
1. Go to System Settings and click MySQL. Click the Uninstall button to remove MySQL from the system.
2. Click the Launchpad icon in the Dock and type Terminal in the search field. Click Terminal to open a new terminal window.
3. Deleting MySQL removes all its databases. If you have critical data stored in MySQL, make sure to back up your files first.
Use mysqldump to back up your databases to a text file. Run the following command:
./mysqldump -u root -p --all-databases > mysqlbackup.sql
The output is redirected to the mysqlbackup.sql file.
4. Check for running MySQL processes by running the following command:
ps -ax | grep mysql
Terminate the running processes using the following syntax:
kill [process_id]
For example, to kill the ttys001
process from the image above, run:
kill 97091
5. Remove the default MySQL directory and all the leftover directories and files. Run these commands:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql
sudo rm -rf /usr/local/var/mysql
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/MySQL*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /private/var/db/receipts/*mysql*
Removing all the directories is important especially if you want to install an older MySQL version on Mac.
6. Use a text editor to open the /etc/hostconfig file and remove the following line:
MYSQLCOM=-YES-
Note: Some versions of macOS don’t have the /etc/hostconfig file, so skip this step if the file doesn’t exist on your system.
After following the steps above, you have successfully uninstalled MySQL from your macOS system and cleaned up unnecessary files.
Conclusion
This tutorial showed how to uninstall MySQL from Linux, Windows, and macOS operating systems.
For more MySQL tutorials, see how to install and get started with MySQL Workbench on Ubuntu, or how to secure your MySQL installation.
Was this article helpful?
YesNo
Вступление
Начиная работать с локальными серверами, делая «притирку» и ища удобный локальный сервер, который будет подходить по всем позициям, приходится периодически удалять, то или иное программное обеспечение. В одной из статей сайта, я рассказывал, как установить веб-сервер MySQL, для работы с базами банных. Здесь будем его удалять.
Итак, задача: полностью удалить MySQL с локальной машины и стереть её пребывание на компьютере.
Исходные данные: на компьютере стоит Windows 7, ранее установлен веб-сервер MySQL 5.7.11, сейчас удаляем MySQL 5.7.11. Покажу три варианта, как удалить MySQL.
Вариант 1, Полностью удалить MySQL вручную
Шаг 1. Идем в Панель Управления→Программы и Компоненты→Удаление и Изменение программы;
Удаляем все программы, которые вы использовали для установки MySQL. В моем варианте это MySQL Installer и MySQL Server 5.7. Для удаления выбираем программу и нажимаем кнопку «Удалить».
Шаг 2.
Идем, в каталог, куда устанавливали MySQL. Скорее всего, это: C: Program Files\MySQL и удаляем всё, что содержит MySQL.
Шаг 3.
Идем, в каталог C:\ProgramData и удаляем папку MySQL (для Windows 7).
Папка ProgramData закрыта для просмотра и чтобы её открыть в Windows 7, вставляем в адресную строку: C:\ProgramData и жмем Enter. Папка откроется для работы. Далее удаляем папки с MySQL.
Примечание: В Windows XP это путь: C:\Documents and Settings\All Users\Application Data\MySQL.
Вариант 2, Автоматическое удаление MySQL
Для автоматического удаления, нам понадобится программа MySQL Installer (в первом варианте мы её удалили).
Чтобы удалить MySQL вместе с аккаунтом root, запускаем MySQL Installer;
Жмем Remove (справа таблицы);
В таблице выделяем, то, что хотим удалить, в моем примере это веб-сервер MySQL 5.7.11 и удаляем по шагам инсталлятора (смотрим фото).
Если Вы ставили больше компонентов MySQL, картинка в окне будет такой:
Инсталятор попросит подтвердить удаление
Начался процесс удаления MySQL
Инсталятор спросит, нужно ли удалять данные из папки ProgramData
Процесс удаления MySQL завершен
На последнем этапе можно удалить и сам инсталлятор MySQL Installer (чекбокс внизу таблицы на следующем фото).
Вариант 3, Удалить MySQL из командной строки
Для разнообразия удалим MySQL из командной строки операционной системы.
Шаг 1.
Из командной строки удаляем службу MySQL. Идем в Пуск→Командная строка в меню пуск. На правой кнопке командной строки запуск сервер от имени Администратора. В строке вводим команду: [sc delete MySQL] (без скобок).
Шаг 2.
Удаляем MySQL через панель или инсталятором (первый или второй вариант), на выбор.
Шаг 3.
Удаляем следы MySQL, то есть, папки содержащие MySQL.
По умолчанию MySQL ставится в папки:
Windows 7: [C:\Program Files\MySQL] и [C:\ProgramData\MySQL]
Windows XP: [C:\Program Files\MySQL] и [C:\Documents and Settings\All Users\Application Data\MySQL].
Чистка реестра Windows
Для успокоения души, поищем следы MySQL в реестре операционной системы (Windows 7).
Вариант чистки реестра Windows 7, опасный
Этим вариантом не следует пользоваться, если вы не представляете, как исправить ошибку.
Откройте реестр Windows 7. Для этого в Меню Пуск→Выполнить, вписываем команду: regedit.
В окне “Редактор реестра” поиском ищем, только раздел, слово MySQL и удаляем его.
Примечание: На фото вы видите, что в реестре нашелся раздел MySQL. Это потому, что я не удалял MySQL Installer и оставил его для примера поиска по реестру.
Вариант 2, безопасная чистка реестра программой CCleaner
Ставим программу «чистильщик Windows», например Defraggler или CCleaner и чистим реестр безопасно. На фото CCleaner.