How to completely remove MySQL from Windows system

Whenever you uninstall MySQL server from “Add/Remove Programs”, only the installed components are removed. The database information (including the tables and data), import or export files, log files, and binary logs produced during execution are kept in their configured location.

WHMCS Complete Billing and Support

You may experience problem reinstalling MySQL server even if you have uninstalled it from “Add/Remove Programs”. During re-installation, it will ask you to enter current root password even if MySQL server is not installed.

Remove MySQL from Windows system

You are experiencing this problem because during removal process, it does not remove data and configuration settings. To fix this problem, you have to follow the below procedures:

Windows VPS – 1 GB RAM / 35 GB HDD / SmarterMail 12.x / SQL 2012 server – Just $9.79/month

For Windows 7 and Windows 2008 server:

[1] Uninstsall MySQL server from “Add/Remove Programs”

[2] Delete C:\Program Files\MySQL [Make sure that you delete the data related to MySQL server]

[3] Delete C:\Program Files (x86)\MySQL [Make sure that you delete the data related to MySQL server]

[4] Delete C:\ProgramData\MySQL [Make sure that you delete the data related to MySQL server]

[5] Delete from any Users’ AppData folders.

Example: C:\Users\Administrator\AppData\Roaming\MySQL

[6] Reinstall MySQL server

Web Hosting

For Windows 2003 (may work for Windows XP):

[1] Delete the associated data directory. On Windows XP and Windows Server 2003, before MySQL 5.1.24, the default data directory would be located within the MySQL installation directory.

[2] On MySQL 5.1.24 and later, the default data directory is the configured AppData directory, which is C:\Documents and Settings\All Users\Application Data\MySQL by default.

After following above steps, if you still see “MySQL” in the service list, run the following command in command prompt to remove the service:

sc delete MySQL

If your service name is MySQL5 or other replace MySQL with appropriate name.

If you want to keep your databases as they are, make sure you take backup of “data” directory instead of removing this folder. You should be able to restore your data directory once MySQL server is re-installed successfully.

Here are the list of web hosts who offer VPS Hosting: AccuWebHosting, HostGator, Arvixe

Kailash Aghera

Posted in MySQL.

Leave a Reply

Your email address will not be published. Required fields are marked *