Link to home
Start Free TrialLog in
Avatar of KevPerkins
KevPerkins

asked on

How do you uninstall MySQL completely?

I am going out of my mind.... I have installed and uninstalled MySQL about 8 times now due to problems I've been having and I STILL cannot uninstall it completely. Every time I reinstall, and then open mysqladmin.exe it STILL shows my old user name and password and I think this is causing my problems. I need a 100% fresh start!

How do I get rid of all traces of MySQL so that I can re-install it "CLEAN"?


Please help me
Avatar of e-tsik
e-tsik
Flag of Israel image

Hi :-)

The uninstall-install process does not remove the database files and the config file.
Database files reside on /var/lib/mysql.
You can also delete a specific database /var/lib/mysql/<database name>.
The config file is in /etc/my.cnf

Apart from that, the other files (which I don't think you have a problem with) get distributed on the filesystem just like any other application. If you remove it through RPM, they get deleted.

I recommend removing these files/folders (/etc/my.cnf, /var/lib/mysql/) AFTER you remove mysql.

Steps as follows:
1. Stop the mysql server.
2. Remove it
3. Delete the files/folders
4. Re-Install

Enjoy!
Avatar of crissand
crissand

I see it's an windows installation. Use winmysqladmin to stop the service and then to uninstall the service. Delete the /mysql folder, my.ini from /windows or /winnt folder, and the link, if exists, to winmysqladmin from startup. Now you can install all from the scratch. If you want to keep your database (or databases), backup all on a folder without the mysql database.
ASKER CERTIFIED SOLUTION
Avatar of e-tsik
e-tsik
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KevPerkins

ASKER

Thanks guys, I really appreciate it. Will give it a whirl and get back to you.

Cheers

Kev
This doesn't answer how to uninstall the MySQL service mine points to the old install ie :
C:\www\mysql\bin\mysqld-max-nt.exe MySQL

But now I have installed PhPDev5 and it resides in :
C:\phpdev5\mysql

How can I either redirect the service or uninstall it so that I can install MySql as a service from "Spinny" on phpDev5

Thanx in advance

HoGG
After banging my head against my keyboard until the S, Q, and L keys sprang out like shrapnel I finally figured out what the problem is and how to solve it.

I was using the MySQL 4.1.11 Installer on my Window XP computer.  After the installation completed the installer automatically jumped into the MySQL Server Instance Config Wizard.  When the wizard tried to complete the configuration the “Error: Cannot create Windows service for MySQL. Error: 0,” popped up.  This is a Windows System Error.

What is happening is a preinstalled MySQL service is installed and recognized in the Windows background.  Weather or not it is disabled the operating system will not allow another MySQL service to be installed.  To verify this you can check the Services.  Do this by clicking on the…

> “Start Menu”
     > “Control Panel”
          > “Administrative Tools”
               > “Services”

The services are listed alphabetically.  Scroll down to find MySQL.  If you find it you have found your problem. (Incidentally, while I was in here I right-mouse-clicked on the service and opened properties, stopped the service and then disabled the service.  The problem still didn’t go away and my head-banging-against-keyboard started up again.) The solution is to remove the service, but there is no option for that in the Services window.  To delete the service you need use the command prompt.  Start the command prompt by clicking on the….

> “Start Menu”
     > “All Programs”
          > “Accessories”
               > “Command Prompt”

This will bring up the Command window.  To delete the MySQL service type the following…

sc delete mysql

…and hit the enter key.  If it is successful the Command Prompt window will give the following feedback.

[SC] DeleteService SUCCESS

For trivia’s sake what you communicate through the Command Prompt window when you type this is…

     sc = you contact a command line program used for
            communicating with the NT Service Controller
            and services

     delete = deletes a service from the registry

     mysql = the service that gets deleted.

What you do next depend on weather MySQL is still installed.  If you didn’t uninstall MySQL click on the…

> “Start Menu”
     > “All Programs”
          > “MySQL”
               > “MySQL Server 4.1”
                    > “MySQL Server Instance Config Wizard”

Run through the Config Wizard.  MySQL should set up with out any problems.

If you already uninstalled MySQL then run though the installer and things should work out.