SSL Connections Never Work

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 4
Joined: Mon 30 Apr 2007 13:11

SSL Connections Never Work

Post by fitchwh » Mon 30 Apr 2007 13:17

I have tested the SSL connectivity on two different valid MySQL SSL enabled installations. The Exception always thrown is "Lost connection to MySQL server during query".

I have tested both of these installations using both the MySQL client and a 3rd party MySQL tool, and successfully connected.

Example code:

Code: Select all

 MySqlConnection Connection = new MySqlConnection();
                Connection.Host = HostName.Text;
                Connection.UserId = Username.Text;
                Connection.Password = Password.Text;
                Connection.Port = Convert.ToInt32(Port.Text);
                if (UseSSL.Checked == true) {
                    SslOptions ssl = new SslOptions();
                    ssl.CACert = "file://"+CACertificate.Text;
                    ssl.Cert = "file://" + ClientCertificate.Text;
                    if (Cipher.Text.Trim().Length > 0) {
                        ssl.CipherList = Cipher.Text.Trim();
                    ssl.Key = "file://" + ClientKey.Text;
                    Connection.SslOptions = ssl;
                    Connection.Protocol = MySqlProtocol.Ssl;
                } // end if
Please help with this issue.

Posts: 4
Joined: Mon 30 Apr 2007 13:11

Will someone please help?

Post by fitchwh » Thu 03 May 2007 03:07

The only thing holding me back from purchasing a license for this is the fact that SSL is not working. Please let me know if this is an issue with the library of if I appear to be doing something wrong.


Post by Serious » Thu 03 May 2007 08:52

Please describe in details ypur problem. Specify full exception text, exception call stack, inner exception details, MySQLDirect .NET version, MySQL server version, OS version.

Posts: 4
Joined: Mon 30 Apr 2007 13:11

Post by fitchwh » Thu 03 May 2007 16:04

The problem was described in full detail.

The MySQL server versions are 5.0.24 and 5.0.33 with SSL (OpenSSL). I am using Windows Vista and XP, MySQLDirect.NET The ONLY exception being returned is a MySqlException, and it's contents are:

"Lost connection to MySQL server during query".

This is the entire contents of the Exception and MySqlException stack.


Post by Serious » Fri 04 May 2007 09:56

Please provide exception call stack (Exception.StackTrace property) and inner exception details (Exception.InerException property).

Post Reply