Page 1 of 1

SSL Connections Never Work

Posted: Mon 30 Apr 2007 13:17
by fitchwh
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
Connection.Open();
Please help with this issue.

Will someone please help?

Posted: Thu 03 May 2007 03:07
by fitchwh
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.

Posted: Thu 03 May 2007 08:52
by Serious
Please describe in details ypur problem. Specify full exception text, exception call stack, inner exception details, MySQLDirect .NET version, MySQL server version, OS version.

Posted: Thu 03 May 2007 16:04
by fitchwh
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 4.0.9.0. 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.

Posted: Fri 04 May 2007 09:56
by Serious
Please provide exception call stack (Exception.StackTrace property) and inner exception details (Exception.InerException property).