Удаление mysql в windows

How to Completely Delete MySQL From Windows? All Versions

Approved By

Anuraag Singh  

Published On

May 8th, 2025

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.

open windows setting

Step 2. In the settings Window, you need to go to Apps and use the search bar to find “MySQL“.

go to apps

type MySQL in the search box

Step 3. Then, locate MySQL-related programs (e.g., MySQL Server, Workbench, Connector, Shell) and uninstall them.

click on uninstall button

Step 4. After the process of uninstallation is done, delete the MySQL folder in C:\Program Files.

go to program files

delete the MySQL folder


Step 5
. If the folder is hidden, go to the View tab, tick Hidden items checkbox.

go to the View tab, tick Hidden items option

Step 6. At last, open the command prompt to verify the uninstallation process if an error appears, and the process is completed.

Type mysql - -version command in cmd

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 Certified Wiping 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.

tool main screen

Step 2. Next, click “Select File” or “Select Folder” as per your comfort.

select file or folder

Step 3. Select the folder to wipe. Generally found at C:\ProgramData\MySQL\MySQL Server <version>\Data\ and click Next to scan.

click on next

Step 4. Choose a wiping method.

choose a data wiping method

Step 5. Click Wipe to begin the process.

press on wipe button

Step 6. Now, view the wiped file/folder details on the screen.

wiping data

Step 7. Lastly, you can analyze the data that is wiped by the following report.

wiping report

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.

Home

VIDEOS

How To Completely Uninstall MySQL In Windows

In this article, we go through how to completely uninstall MySQL in Windows. Whether you’re troubleshooting a broken installation, reclaiming disk space, or preparing for a fresh setup, fully removing MySQL from Windows involves more than just hitting Uninstall in the Control Panel.

Leftover service definitions, data folders, registry entries, and environment variables can linger—causing headaches down the road. This guide walks you through every step to ensure MySQL is 100% gone from your system. This will work whether you’re using Windows 7, 8, 10, or 11.

For this to work, you’ll need Administrator privileges. You’ll need to run every command and open every tool as an administrator. Also, if you have any databases you care about, export them first using mysqldump or MySQL Workbench.

Proceed with caution when editing the registry. This is powerful but dangerous. A mistaken deletion can destabilize your PC. Always double‑check which keys you’re removing.

Watch: Install Pygame

Uninstall MySQL In Windows

The first step, which is optional, stop & disable the MySQL Service. Simply open Services by pressing  Win+R, type services.msc and hit Enter. Find any service named MySQL, MySQL80, or similar. Right‑click on it and select Stop.

Perform a right‑click once again, select Properties, set Startup type to Disabled and hit OK.

Alternatively, use an elevated Command Prompt:

bat
Copy
Edit
sc stop MySQL80
sc config MySQL80 start= disabled

Uninstall a However, this is optional. You can simply start with the uninstallation from the Control Panel. Simply type Control Panel on your computer and select Uninstall a Program, under the Programs section to see all the programs in your computer.

Uninstall a program From Control Panel

Locate the MySQL Workbench. Simply click on it to highlight, then right-click and select Uninstall.

How To Completely Uninstall MySQL In Windows

From the two prompts that come up, asking you to confirm the uninstallation, select Yes each time.

Next, click to highlight the MySQL Shell option, then right-click and select Uninstall.

How To Uninstall MySQL Shell In Windows

From the two prompts that come up, asking you to confirm the uninstallation, select Yes each time.

Select MySQL Server to highlight it. Then right-click and select Uninstall.

How To Uninstall MySQL Server In Windows

From the two prompts that come up, asking you to confirm the uninstallation, select Yes each time.

Finally, locate the MySQL Installer. Click on it to highlight, then right-click and select Uninstall.

How To Uninstall MySQL Installer In Windows

From the two prompts that come up, asking you to confirm the uninstallation, select Yes each time.

This removes the core program files but often leaves data directories and registry traces untouched. Close the Control Panel.

Completely Uninstall MySQL In Windows

Even after uninstalling, you’ll typically find folders here:

Program Files: C:\Program Files\MySQL\

C:\Program Files (x86)\MySQL\

Program Files In Windows

Data directory (default): C:\ProgramData\MySQL\

Program Data In Windows

Note: The ProgramData folder is hidden by default— enable Show hidden files in File Explorer (Windows 7/8). For Windows 10/11, simply click on View in the File Explorer options, select Show and enable Hidden Items.

How To Show Hidden Files In Windows

Delete these entire folders to wipe out binaries, libraries, and any remaining data files. Simply right-click on each folder and select the Delete or Bin icon. You can also press Shift+Delete to delete the folders permanently.

You can perform a system reboot if you so choose. This ensures locked files and service definitions are fully cleared from memory. After restarting, rerun the verification checks above. However, a reboot is not necessary.

Read: How To Install Pygame

About The Author

Erick Wachira

Based in Nairobi, Kenya, I am a tech enthusiast who travels down the forgotten road of tutorials regarding everyday tech. We all use our smartphones, TVs, Bluetooth devices, PCs and many more tech devices in our day-to-day. With that, comes issues from time-to-time that need a solution you may not have though of, or might have overlooked. This is where I come in. To the rescue as I offer you solutions and troubleshooting steps to everyday tech problems.

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.

How to uninstall MySQL on Windows, Linux or 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
Stopping all MySQL services on Linux Ubuntu.

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
Uninstalling the MySQL server and client from Ubuntu.

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
Removing the mysql user and mysql group.

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.

Run the command prompt as administrator in Windows.

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
Change the working directory in Windows.

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.

Opening the Control Panel.

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.

Uninstall MySQL in Windows.

Click Yes for each prompt and wait for the wizard to finish.

Confirming MySQL installation in Windows.

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:

Showing hidden items in Windows.

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.

Uninstalling MySQL from macOS.

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
Checking for running MySQL processes in macOS.

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. В моем варианте это MySQL Installer и MySQL Server 5.7. Для удаления выбираем программу и нажимаем кнопку «Удалить».

Шаг 2.

Идем, в каталог, куда устанавливали MySQL. Скорее всего, это: C: Program Files\MySQL и удаляем всё, что содержит MySQL.

удалить MySQL с диска

полностью удалить MySQL начало

Шаг 3.

Идем, в каталог C:\ProgramData и удаляем папку MySQL (для Windows 7).

Папка ProgramData закрыта для просмотра и чтобы её открыть в Windows 7, вставляем в адресную строку: C:\ProgramData и жмем Enter. Папка откроется для работы. Далее удаляем папки с MySQL.

удаляем MySQL из ProgramData windows7

Примечание: В Windows XP это путь:  C:\Documents and Settings\All Users\Application Data\MySQL.

Вариант 2, Автоматическое удаление MySQL

Для автоматического удаления, нам понадобится программа MySQL Installer (в первом варианте мы её удалили).

Чтобы удалить MySQL вместе с аккаунтом root, запускаем MySQL Installer;

insaller-mysql

Жмем Remove (справа таблицы);

В таблице выделяем, то, что хотим удалить, в моем примере это веб-сервер MySQL 5.7.11 и удаляем по шагам инсталлятора (смотрим фото).

insaller-remove-удалить MySQL

Удаление веб-сервера MySQL

Если Вы ставили больше компонентов MySQL, картинка в окне будет такой:

MySQL-удаление

Удаление полного набора MySQL

Инсталятор попросит подтвердить удаление

insaller-remove-удалить MySQL-1

Начался процесс удаления MySQL

insaller-remove-удалить-MySQL-2

Инсталятор спросит, нужно ли удалять данные из папки ProgramData

insaller-remove-удалить MySQL-3

Процесс удаления MySQL завершен

insaller-remove-удалить MySQL-4

На последнем этапе можно удалить и сам инсталлятор MySQL Installer (чекбокс внизу таблицы на следующем фото).

insaller remove

Вариант 3, Удалить MySQL из командной строки

Для разнообразия удалим MySQL из командной строки операционной системы.

Шаг 1.

Из командной строки удаляем службу MySQL. Идем в Пуск→Командная строка в меню пуск. На правой кнопке командной строки запуск сервер от имени Администратора. В строке вводим команду: [sc delete MySQL] (без скобок).

командная строка запуск админ

Открываем командную строку от имени администратора
удаляем-службу-mysql-из-командной-строки

Вписываем команду: sc delete MySQL
удалить из командной строки

Успех, сервис 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 из реестра 1

удаляем MySQL

Примечание: На фото вы видите, что в реестре нашелся раздел MySQL. Это потому, что я не удалял MySQL Installer и оставил его для примера поиска по реестру.

Вариант 2, безопасная чистка реестра программой CCleaner

Ставим программу «чистильщик Windows», например Defraggler или CCleaner и чистим реестр безопасно. На фото CCleaner.

CCleaner-free-1

Чистка реестра CCleaner-free
CCleaner-free

CCleaner создаст резервую копию реестра
CCleaner-free-исправлено-1

Реестр исправлен

Другие статьи раздела: Локальный сервер 

Table of Contents

  1. Introduction
  2. Uninstalling MySQL on Windows
  3. Uninstalling MySQL on macOS
  4. Uninstalling MySQL on Linux
    1. Advanced Uninstallation Tips
  5. Conclusion

Introduction

MySQL, owned by Oracle, is one of the most widely used open-source relational database management systems (RDBMS). While it’s beneficial to have MySQL installed to manage databases for various applications, there may come a time when you need to uninstall MySQL from your system. This process may involve a bit more than simply dragging a folder to the trash or using a basic uninstall command. In this guide, we will take a step-by-step approach to completely remove MySQL and all its associated files from your system.

This tutorial will focus on uninstalling MySQL from different operating systems such as Windows, macOS, and Linux. We will provide detailed instructions as well as code examples and expected outputs to ensure a smooth uninstallation process.

Uninstalling MySQL on Windows

To uninstall MySQL from a Windows OS, you need to follow these steps:

  1. Open the Control Panel.
  2. Navigate to ‘Programs’ -> ‘Programs and Features’.
  3. Select MySQL Server from the list and click the ‘Uninstall’ button.

After the uninstallation process is complete, you should remove any remaining service instances. Open up the Command Prompt as an administrator and type the following:

sc delete mysql

If the service is not named ‘mysql’ on your system, replace ‘mysql’ with the correct service name in the above command.

Delete the remaining files and folders manually. You might find MySQL installed in the ‘Program Files’ or ‘ProgramData’ folder. Ensure that you have shown hidden files and folders, and then delete the MySQL folders:

rmdir /S "C:\Program Files\MySQL"
rmdir /S "C:\ProgramData\MySQL"
rmdir /S "C:\Users\[YourUsername]\AppData\Roaming\MySQL"

Replace ‘[YourUsername]’ with your actual username on your Windows system.

Next, you’ll have to clean any MySQL entries from the Windows Registry. Be cautious when editing the registry and ensure to backup before making any changes. Run the Registry Editor (regedit) and delete the following keys:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL
HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB

Uninstalling MySQL on macOS

Uninstalling MySQL on a Mac system is not much different from the process on Windows, but it requires some terminal commands. Here are the steps:

  1. Open Terminal.
  2. Stop the MySQL service using the following command:
sudo /usr/local/mysql/support-files/mysql.server stop

Remove the MySQL folder:

sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM

You should also unload the launch agents that automatic start MySQL:

launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysql.plist
rm ~/Library/LaunchAgents/com.mysql.mysql.plist

Finally, you need to remove the MySQL preferences and cached files:

rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /private/var/db/receipts/*mysql*

Uninstalling MySQL on Linux

The process to remove MySQL on Linux systems varies between distributions. Here’s a general guide that applies to systems using the `apt-get` package manager (like Ubuntu).

Stop the MySQL service:

sudo service mysql stop

Remove the MySQL packages:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

Delete the MySQL configuration and data files:

sudo rm -rf /etc/mysql /var/lib/mysql
sudo rm -rf /var/log/mysql*

And again, you can also remove the MySQL users:

sudo deluser mysql
sudo delgroup mysql

Note that these commands may need to be adapted if you’re using a different package manager like `yum` or `dnf` for Red Hat-based systems or `zypper` for openSUSE systems.

Advanced Uninstallation Tips

If you have custom configurations, you may need to manually search and remove those configurations from your system. Use the following command to search for any remaining MySQL related files:

sudo find / -iname '*mysql*'

Carefully check the resulting list and delete the files that are meant to be removed. Make sure not to remove system files essential for other applications.

Conclusion

After following the steps in this tutorial, MySQL should be completely removed from your system. While most uninstalled data and service instances will be cleansed through established processes, checking for residual configuration files is good practice. As always, when dealing with system configurations and uninstalling core software components meticulously, ensure every step is understood and properly executed to avoid unintended consequences.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как найти серийный номер ноутбука в windows
  • Обход лицензии windows 10
  • Папка d3dscache windows 10 можно ли удалить
  • Конфигурация компьютера как открыть windows server 2008
  • Kinect drivers windows 10