Bug #100609 Unable to uninstall or upgrade MySQL Connector NET 8.0
Submitted: 21 Aug 2020 20:37 Modified: 23 Aug 2020 16:57
Reporter: J K Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:8.0.19 OS:Windows (Windows 10)
Assigned to: CPU Architecture:Any
Tags: connector, installation, MySQL

[21 Aug 2020 20:37] J K
Description:
Due to an error with MySQL Community, I planned to uninstall and reinstall MySQL (and upgrade it to version 8.0.21).

After deleting C:/Program Files (x86)/MySQL, I was able to get rid of most of the MySQL programs (e.g. MySQL Server, MySQL Router...), but when uninstalling MySQL Connector .NET 8.0, the MySQL Connector .NET 8.0 setup wizard ran into an error and was unable to complete the operation (possibly because it tried to delete a file that no longer exists).

I deleted two entries containing "MySQL Connector .NET 8.0" in the Registry Editor. MySQL Connector .NET 8.0 is no longer recognized as a program according to Windows, but it is still recognized by the MySQL installer. 

For reference, whenever I try to upgrade MySQL Connector to 8.0.21, the installer downloads MySQL Connector successfully, reaches 52% progress in upgrading MySQL Connector, backtracks to 50% progress and then announces the upgrade has failed. 

I tried to manually install MySQL Connector .NET 8.0 (on its own) in order to replace the damaged version, but the 8.0.21 installer came back with an error, and the 8.0.19 installer assumes it already exists. 

In conclusion, I can't remove MySQL Connector, upgrade it to 8.0.21 or get MySQL to download it as if it had never existed (as when I try to upgrade it, I think MySQL tries to get rid of the old MySQL Connector).

I am trying to run a PHP program that accesses a MySQL database, and ever since I deleted the MySQL folder in Program Files (x86), I am unable to install or use MySQL. 

 

How to repeat:
1. Have a Windows 10 computer running MySQL Community 8.0.19. 
2. Get rid of C:/Program Files (x86)/MySQL.
3. Uninstall all the other MySQL programs, and then try to uninstall MySQL Connector NET 8.0. 

Suggested fix:
I do not need a fix, I would just like to know how to make it so MySQL doesn't recognize the existence of this program.
[21 Aug 2020 20:38] J K
The log when I try to upgrade MySQL Connector looks like this:

1: Action 16:27:27: INSTALL. 
1: 1: MySQL Connector Net 8.0.21 2: {B76BB4C5-40E4-4D2C-8A18-8C85C304D084} 
1: Action 16:27:27: FindRelatedProducts. Searching for related applications
1: Action 16:27:27: AppSearch. Searching for installed applications
1: Action 16:27:27: LaunchConditions. Evaluating launch conditions
1: Action 16:27:27: ValidateProductID. 
1: Action 16:27:27: CostInitialize. Computing space requirements
1: Action 16:27:27: FileCost. Computing space requirements
1: Action 16:27:27: CostFinalize. Computing space requirements
1: Action 16:27:27: InstallValidate. Validating install
1: Action 16:27:27: Setv45InstallUtil. 
1: Action 16:27:27: InstallInitialize. 
1: Action 16:27:27: RemoveExistingProducts. Removing applications
1: Application: {AD00B12C-103B-4DED-BC1D-ACC2A87FF24E}, Command line: UPGRADINGPRODUCTCODE={B76BB4C5-40E4-4D2C-8A18-8C85C304D084} CLIENTPROCESSID=5208 CLIENTUILEVEL=3 MSICLIENTUSESEXTERNALUI=1 REMOVE=ALL
1: Action 16:27:28: INSTALL. 
1: 1: MySQL Connector Net 8.0.19 2: {AD00B12C-103B-4DED-BC1D-ACC2A87FF24E} 
1: Action 16:27:28: FindRelatedProducts. Searching for related applications
1: Action 16:27:28: AppSearch. Searching for installed applications
1: Property: OLDVERSION, Signature: Ver5081
1: Property: OLDVERSION, Signature: Ver507
1: Property: OLDVERSION, Signature: Ver506
1: Property: OLDVERSION, Signature: Ver505
1: Property: OLDVERSION, Signature: Ver504
1: Property: OLDVERSION, Signature: Ver503
1: Property: OLDVERSION, Signature: Ver502
1: Property: OLDVERSION, Signature: Ver501
1: Property: OLDVERSION, Signature: Ver500
1: Property: PREUPGRADEVERSION, Signature: Pre638
1: Property: PERUSERINSTALL, Signature: Reg638
1: Property: PERUSERINSTALL, Signature: Reg644
1: Property: HLM_LOCATION, Signature: HLMRegSearch
1: Property: NETFRAMEWORK45, Signature: NetFramework45
1: Action 16:27:28: LaunchConditions. Evaluating launch conditions
1: Action 16:27:28: ValidateProductID. 
1: Action 16:27:28: CostInitialize. Computing space requirements
1: Action 16:27:28: FileCost. Computing space requirements
1: Action 16:27:28: CostFinalize. Computing space requirements
1: Action 16:27:28: InstallValidate. Validating install
1: Action 16:27:28: Setv45InstallUtil. 
1: Action 16:27:28: InstallInitialize. 
1: Action 16:27:28: GenerateScript. Generating script operations for action:
1: InstallInitialize
1: Action 16:27:28: RemoveExistingProducts. Removing applications
1: Action 16:27:28: ProcessComponents. Updating component registration
1: 
1: Action 16:27:28: MsiUnpublishAssemblies. Unpublishing assembly information
1: Application Context:Unpublishing assembly information, Assembly Name:
1: Action 16:27:28: UnpublishFeatures. Unpublishing Product Features
1: Feature: Unpublishing Product Features
1: Action 16:27:28: UninstallPerfCounterData. 
1: Action 16:27:28: RollbackUnregisterPerfCounterData. 
1: 
1: Action 16:27:28: UnregisterPerfCounterData. 
1: 
1: Action 16:27:28: RemoveRegistryValues. Removing system registry values
1: Key: Removing system registry values, Name: 
1: Action 16:27:28: RemoveShortcuts. Removing shortcuts
1: Shortcut: Removing shortcuts
1: Action 16:27:28: ManagedDataUnInstallSetup. 
1: Action 16:27:28: ManagedDataUnInstall. Unregistering data provider from machine.config
1: Action 16:27:28: ManagedWebUnInstallSetup. 
1: 
1: Action 16:27:29: RemoveFiles. Removing files
1: File: Removing files, Directory: 
1: Action 16:27:29: RemoveFolders. Removing folders
1: Folder: Removing folders
1: Action 16:27:29: CreateFolders. Creating folders
1: Action 16:27:29: InstallFiles. Copying new files
1: Action 16:27:29: CreateShortcuts. Creating shortcuts
1: Action 16:27:29: WriteRegistryValues. Writing system registry values
1: Action 16:27:29: InstallPerfCounterData. 
1: Action 16:27:29: RegisterUser. Registering user
1: Action 16:27:29: RegisterProduct. Registering product
1: Action 16:27:29: MsiPublishAssemblies. Publishing assembly information
1: Action 16:27:29: PublishFeatures. Publishing Product Features
1: Action 16:27:29: PublishProduct. Publishing product information
1: 
1: Action 16:27:29: InstallFinalize. 
1: Action 16:27:29: InstallInitialize. 
1: Action 16:27:29: ProcessComponents. Updating component registration
1: Action 16:27:29: MsiUnpublishAssemblies. Unpublishing assembly information
1: Application Context:Global, Assembly Name:MySql.Data,version="8.0.19.0",culture="neutral",publicKeyToken="C5687FC88969C44D",processorArchitecture="MSIL"
1: Application Context:Global, Assembly Name:Google.Protobuf,version="3.6.1.0",culture="neutral",publicKeyToken="A7D26565BAC4D604",processorArchitecture="MSIL"
1: Application Context:Global, Assembly Name:BouncyCastle.Crypto,version="1.8.3.0",culture="neutral",publicKeyToken="0E99375E54769942"
1: Application Context:Global, Assembly Name:Renci.SshNet,version="2016.1.0.0",culture="neutral",publicKeyToken="1CEE9F8BDE3DB106",processorArchitecture="MSIL"
1: Application Context:Global, Assembly Name:SshNet.Security.Cryptography,version="1.2.0.0",culture="neutral",publicKeyToken="C5687FC88969C44D",processorArchitecture="MSIL"
1: Application Context:Global, Assembly Name:Ubiety.Dns.Core,version="2.2.1.0",culture="neutral",publicKeyToken="C5687FC88969C44D",processorArchitecture="MSIL"
1: Application Context:Global, Assembly Name:MySql.Web,version="8.0.19.0",culture="neutral",publicKeyToken="C5687FC88969C44D",processorArchitecture="MSIL"
1: Action 16:27:29: UnpublishFeatures. Unpublishing Product Features
1: Feature: EntityFramework
1: Feature: Core.Feature
1: Feature: WebProviders
1: Feature: Plugins
1: Action 16:27:29: RollbackUnregisterPerfCounterData. 
1: Action 16:27:29: UnregisterPerfCounterData. 
1: Action 16:27:29: RemoveRegistryValues. Removing system registry values
1: Key: \Software\MySQL AB, Name: Default
1: Key: \Software\MySQL AB\MySQL Connector/Net, Name: Version
1: Key: \Software\MySQL AB\MySQL Connector/Net, Name: Location
1: Key: \Software\MySQL AB\MySQL Connector/Net, Name: 
1: Key: \SOFTWARE\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx\MySQL Connector Net 8.0.19 v4.5.1, Name: 
1: Key: \SOFTWARE\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx\MySQL Connector Net 8.0.19 v4.5.1, Name: 
1: Key: \SYSTEM\CurrentControlSet\Services\.NET Data Provider for MySQL\Linkage, Name: Export
1: Key: \SYSTEM\CurrentControlSet\Services\.NET Data Provider for MySQL\Performance, Name: 
1: Key: \SYSTEM\CurrentControlSet\Services\.NET Data Provider for MySQL\Performance, Name: Library
1: Key: \SYSTEM\CurrentControlSet\Services\.NET Data Provider for MySQL\Performance, Name: Open
1: Key: \SYSTEM\CurrentControlSet\Services\.NET Data Provider for MySQL\Performance, Name: Collect
1: Key: \SYSTEM\CurrentControlSet\Services\.NET Data Provider for MySQL\Performance, Name: Close
1: Key: \SYSTEM\CurrentControlSet\Services\.NET Data Provider for MySQL\Performance, Name: IsMultiInstance
1: Key: \SYSTEM\CurrentControlSet\Services\.NET Data Provider for MySQL\Performance, Name: Counter Names
1: Key: \SYSTEM\CurrentControlSet\Services\.NET Data Provider for MySQL\Performance, Name: Counter Types
1: Action 16:27:29: RemoveShortcuts. Removing shortcuts
1: Shortcut: upfn1-0t|Documentation
1: Shortcut: vaitcdd6|ChangeLog
1: Shortcut: _rq6aex9|Release Notes
1: Action 16:27:29: ManagedDataUnInstall. Unregistering data provider from machine.config
1: 1: MySQL Connector Net 8.0.19 2: {AD00B12C-103B-4DED-BC1D-ACC2A87FF24E} 3: 3 
1: Action 16:27:30: Rollback. Rolling back action:
1: Unregistering data provider from machine.config
1: Removing shortcuts
1: Removing system registry values
1: UnregisterPerfCounterData
1: RollbackUnregisterPerfCounterData
1: Unpublishing Product Features
1: Unpublishing assembly information
1: Updating component registration
1: InstallInitialize
1: 1: MySQL Connector Net 8.0.21 2: {B76BB4C5-40E4-4D2C-8A18-8C85C304D084} 3: 3 
1: The action 'Upgrade' for product 'Connector/NET 8.0.21' failed.
[23 Aug 2020 15:49] MySQL Verification Team
Please check bug https://bugs.mysql.com/bug.php?id=76155 about machine.config file from Sarah Weinberger which solved the issue for her.
[23 Aug 2020 16:57] J K
I managed to fix this error on my own by installing a registry cleaner and deleting all references to the MySQL Connector NET 8.0 program. After that, I was able to successfully install MySQL again.