I've had to battle this for quite a few hours! I also managed to fix this myself as most of the information available was of no use - quite an achievement for me.
I previously had a version of the MySQL .Net Connector installed. At some point I uninstalled it in order to get past problems with WebMatrix. It seems that the uninstall process is a bit faulty (see here for one example: http://bugs.mysql.com/bug.php?id=64443)
The fix
- Run the "Start the Program Install and Uninstall troubleshooter" tool on this page: http://support2.microsoft.com/kb/2438651
- Tell the wizard that you're having problems uninstalling a product.
- After a short while, select the "MySQL Net Connector " item in the list and have the wizard "repair" the uninstall
Non WebMatrix install
4. If you're not installing via WebMatrix then run the installer for the connector. Select "Custom" install and make sure that only the CORE components are installed. The install will now complete successfully. It seems some of the other components are what causes the install problems. I suspect it's some sort of GAC issue, but I can't be sure.
WebMatrix install
5. If you're using WebMatrix then identify which version of the MySQL connector it's trying to install (6.5.4 at the time of writing). Get the version (and the msi package) by attempting to install whatever gallery application you are trying to install that fails (ie, WordPress). Open up the install log. In there should be the location of the connector msi. Copy & paste it.
6. Now open an elevated command prompt. Type in
msiexec /i "<pasted location of the connector msi file>"
Don't forget the speech marks!
Run the installer as per step 4.
Obviously, this won't be much use if you need the other components installed as well, but it's a start.