14

I recently uninstalled and reinstalled MySQL (on Windows 7) using the installer. When I try to set up the MySQL Server, it won't let me continue unless I enter the "current" root password??? I don't understand how there can be a current root password if I completely uninstalled and reinstalled the program.

I've tried with a blank password as well as every password I can possibly think of that I would have used and nothing works. Google is completely unhelpful as every result I've found either refers to a "homebrew" installation, whatever that is, or refers to installations on Linux. Is there some folder of config files that the uninstallation refuses to delete that I need to remove manually? Or am I missing something else?

image of problem because SO won't let you have pictures until you're popular

Derviş Kayımbaşıoğlu
  • 28,492
  • 4
  • 50
  • 72
Jess
  • 307
  • 1
  • 2
  • 11

5 Answers5

23

After uninstallation process, please check following directories if it exists and remove:

  • C:\Program Files\MySQL
  • C:\Program Files (x86)\MySQL
  • C:\ProgramData\MySQL
  • C:\Users[User-Name]\AppData\Roaming\MySQL

PS: Please keep in mind that If you have multiple MySql Instances installed on your workstation, you need to go into each directory and delete only the relevant instance.

Derviş Kayımbaşıoğlu
  • 28,492
  • 4
  • 50
  • 72
  • 6
    Dangerous advice. With that the user might remove more than what's intended (e.g. if more than one server was installed). Instead the user should specifically look for the version (s)he wants to uninstall and only remove the data for that version (and the same architecture (x86, x64) for that matter. – Mike Lischke Jan 30 '19 at 09:05
  • 2
    @MikeLischke, sometimes the best thing to do is to get rid of all it start from ground zero. – Alex Byrth Feb 15 '20 at 15:12
  • 1
    I think the db data itself is likely located in `C:\ProgramData\MySQL\data` – JVE999 May 09 '20 at 17:23
2

I too faced the same issue but the following worked for me: Go to Control Panel >> Programs >> Programs and Features, select MySQL Server and click Uninstall. Also uninstall the MySQL workbench, MySQL Installer Community, MySQL Router. Then delete the files:

C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL
C:\Users\[User-Name]\AppData\Roaming\MySQL

Finally restart your system and install MySQL again.

Procrastinator
  • 2,526
  • 30
  • 27
  • 36
1

In a fresh development machine, after installing MySQl 8.0.18 in Windows 10 64 bit, I hit this error and could not connect to MySql.
Nothing else worked. Then I uninstalled the Mysql and deleted C:\Program Files\MySQL and retried installing MySql 8.0.18 and while re-installing it asked to specify root user password. After specifying the root password, I was able to connect.

0

I was also facing the same problem, i tried the same process and this works for me too. Also i uninstalled my MySQL installer, MySQL shell, MySQL workbench, MySQL server and all connectors and routers from my Control Panel>>Uninstall a program and after deleting everything. I tried this solution install MySQL again from the oracle website and everything worked fine.

0

when I was facing the same issue, I used "password" for root password, which is default for MySql.