I am having a problem where Visual Studio crashes when I try to create a new connection to MySQL.
Here is my setup:
- Visual Studio 2015
- MySQL for Visual Studio 1.2.6
- MySQL Connector/Net 6.9.8
- MySQL Workbench Community 6.3.6
Note that I can connect to MySQL server from Workbench just fine.
Here are the repro steps:
- Open Visual Studio 2015, do not open any solutions or projects (although opening a solution or project makes no difference).
- In Server Explorer, right-click Data Connections -> Add Connection
- Choose MySQL Database, with .NET Data Provider for MySQL, -> NEXT
- Enter server details on the next dialog. TEST the connection -> Shows SUCCESS.
- Select database -> Shows correct list of databases in dropdown.
- Click OK.
- Visual Studio 2015 crashes. I checked the event log, and here is the stack trace:
Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception.
Exception Info: MySql.Data.MySqlClient.MySqlException
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
Exception Info: MySql.Data.MySqlClient.MySqlException
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(System.Exception)
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean)
at MySql.Data.MySqlClient.NativeDriver.Authenticate(System.String, Boolean)
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySql.Data.MySqlClient.MySqlConnectionStringBuilder)
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at MySql.Data.VisualStudio.MySqlConnectionSupport.Open(Boolean)
at MySql.Data.VisualStudio.MySqlDataConnectionUI.DatabaseExists()
at MySql.Data.VisualStudio.MySqlDataConnectionUI.okButton_Click(System.Object, System.EventArgs)
at System.EventHandler.Invoke(System.Object, System.EventArgs)
at System.Windows.Forms.Control.OnClick(System.EventArgs)
at System.Windows.Forms.Button.OnClick(System.EventArgs)
at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)
Any ideas on what may be causing this? I tried leaving the "Always use this selection" checkbox in the Add New Connection dialog unchecked, as was suggested in a similar issue with Visual Studio 2013, but no luck.
I've also tried some of the suggestions from this post, but without success.