Bug #31731 Cannot create new MySQL connection in Server Explorer in Visual Studio
Submitted: 21 Oct 2007 3:05 Modified: 13 Nov 2007 12:41
Reporter: Morgan Soley
Status: Closed
Category:Connector/Net Severity:S3 (Non-critical)
Version:5.1.3 OS:Microsoft Windows
Assigned to: Target Version:

[21 Oct 2007 3:05] Morgan Soley
Description:
I just did a clean install of Visual Studio Professional 2005, with Service Pack 1.  I
also installed MS Ajax and the MS Ajax control toolkit.  I then installed the MySQL Net
Connector version 5.1.3.

I created a blank Web project (AJAX enabled), with nothing on the page.  In server
explorer, I try to add a new connection, and choose MySQL database from the list, and then
hit next.  The "Add Connection" window comes up, prompting for server name, user name,
password, and database name.  However, typing ANYTHING into any of these fields, or
clicking the "Save password" checkbox, causes the "Add Connection" window to disappear
entirely. 

This does not happen if I choose any other database type.

Additionally, if I drop a SQL Datasource onto the page, and attempt to configure it, the
"MySQL Database" option doesn't even show up in the list of possible database types.

How to repeat:

1. Open the server explorer in Visual Studio.

2. Right-click "Data Connections" and choose "Add Connection"

3. Choose "MySQL Database" and click "Continue".

4. Attempt to type anything into the text fields in the connection setup window.
[21 Oct 2007 4:44] Morgan Soley
Follow up:

I couldn't get 5.1.3. to uninstall properly, experiencing the same thing as discussed
here: 
http://forums.mysql.com/read.php?38,174528,174528#msg-174528

I used the windows install cleanup utility listed in that thread to remove the 5.1.3
installation and downloaded 5.1.2 from the archive.  I am no longer experiencing the
problem listed in this bug report (disappearing "add connection" window) with 5.1.2.
[25 Oct 2007 20:31] Reggie Burnett
Did you have a failed install already on your system before you installed 5.1.3?  The
reason the dialog disappears is because you either have two connector/net assemblies
registered in your machine.config or you don't have one in your GAC at all.

I can confirm there is a bug where if a failed uninstall doesn't remove the machine.config
registration, then a new install will add another one and this will break VS in the way
that you describe.
[25 Oct 2007 20:37] Reggie Burnett
Verified the error in 5.1.3 that can add a duplicate entry in machine.config and this can
cause the behavior the user is seeing.  If this turns out not to be the issue, the user is
encouraged to open a new bug report.
[25 Oct 2007 20:47] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/36365
[25 Oct 2007 20:49] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/36366
[25 Oct 2007 20:49] Reggie Burnett
Fixed in 5.1.4 (also applied all relevant parts of the patch to 5.0.9)
[30 Oct 2007 18:50] Morgan Soley
Thanks for the responses Reggie.  I investigated and it appears that the connector may
have been installed on the machine previously!  I will try 5.1.4 when I get a chance and
reopen a ticket if the error continues.

Thanks again.
[13 Nov 2007 12:41] MC Brown
A note has been added to the 5.0.9 and 5.1.4 changelogs: 

        Installing over a failed uninstall of a previous version could
        result in multiple clients being registered in the
        machine.config. This would prevent certain
        aspects of the MySQL connection within Visual Studio to work
        properly.