Как удалить службу mysql в windows 10

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.

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

tool main screen

Step 2. Next, click “Add File” or “Add 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 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.

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

  1. Stop the MySQL Service
  2. Uninstall MySQL via Control Panel
  3. Remove MySQL Data Directory
  4. Clean Up the Windows Registry
  5. 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.

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

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

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

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

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Windows 7 начальная как восстановить фон рабочего стола
  • Universal theme patcher for windows
  • Sleeping dogs вылетает на windows 10
  • Программа для проверки микрофона на компьютере windows 10
  • Как установить windows 7 с загрузочного диска на ноутбук