check for xampp or wamp too, they both run mysql and can screw up standalone installs. had that issue where i had 2 mysql instances messing up my fresh setup.
The problem’s probably leftover data in your Windows user profile that sticks around after uninstalling. Check C:\Users[YourUsername].mysql_history and any .my.cnf files in your user directory - these config remnants trick the installer into thinking it’s upgrading instead of doing a clean install. Same thing happened to me switching MySQL versions. The installer kept using old authentication settings until I deleted those hidden profile configs and rebooted. Then it finally let me create a new root password instead of asking for the old one. Windows caches service configs even after registry cleanup, so the restart clears that out too.
You need to hit the registry to fully clean out MySQL. After stopping the service, open Registry Editor and nuke any MySQL entries under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. Also check HKEY_LOCAL_MACHINE\SOFTWARE\MySQL and delete that whole key. Don’t miss C:\Users[username]\AppData\Roaming\MySQL either - that folder gets overlooked but has user configs that’ll mess with new installs. Same thing happened to me last year. Those registry entries kept my old password alive through multiple reinstalls.
Check your MySQL installer cache too. Even after you completely remove MySQL, the installer often keeps cached config data that makes it think you’re upgrading instead of doing a fresh install. Go to C:\ProgramData\MySQL\MySQL Installer for Windows and delete the whole folder if it’s there. I hit this same problem when switching MySQL versions - the installer skipped the setup wizard and tried using old credentials. Also run netstat -an | findstr 3306 to make sure port 3306 is actually free before reinstalling. Sometimes other database services grab that port during cleanup and MySQL fails silently, leaving you with a broken install that’s still trying to use old password hashes.
This happens all the time when MySQL service entries stick around after uninstalling. Besides the registry and ProgramData cleanup others mentioned, check if MySQL’s still running as a Windows service. Open Command Prompt as admin and run sc query mysql to see if any MySQL services are registered. If they’re there, use sc delete mysql to wipe them out. I hit this exact issue where the service was hogging port 3306 and breaking my new install. Also check Task Manager - kill any mysql processes before you reinstall. The installer won’t overwrite configs if it thinks MySQL’s already there, which is why it’s asking for your old password.
make sure to stop MySQL from services.msc first. then head to the hidden ProgramData folder and delete the MySQL directory. that’s where the config files are. also, check your system PATH to remove any MySQL entries before you try reinstalling.
Been there. Manual cleanup sucks and you always miss something.
Automate it instead. I built a workflow that stops MySQL services, cleans registry entries, removes leftover files from ProgramData and AppData, kills running processes, and handles the fresh install.
Runs everything in the right order so you don’t have to remember which folders to check or worry about missing registry keys. Verifies each step before moving to the next.
I use this for other messy uninstalls at work. Way more reliable than doing it manually and forgetting some random config file that breaks the new install.