MySQL and SSL connection

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Sat 04 Mar 2006 19:16

This is one of this things that drives me nuts...

I have finally managed to get connected to the mysql SSL server:

I had to had 2 spaces before my username to manage that.
WHY???

I couldn't understand why I would get an error message like:

Access denied for user 'vid'@'192.168.0.10' (using password: YES)

I fiddled around with other things and it didn't work. When I did what seems totally absurd, i.e. type " david" as a user name instead of "david" ... then as if by magic, it worked!!!

There is thus clearly a coding problem in the MyDAC component. Could you fix this please and send us the update. I am not going to ask my clients to add 2 spaces before their names when logging onto the apps...

Let me know asap please!
________
Gift cards
Last edited by david_labbe on Fri 18 Feb 2011 15:31, edited 1 time in total.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Mon 06 Mar 2006 09:58

well... back to square one...

I had to reinstall my whole computer as a result of some serious corruption of the system files (probably du to some windows update ... )

Consequence: it doesn't work again. I am back to the stage where I get an error message with nothing in it!...

I have had enough! I think I will give up on the capability of MyDAC to handle SSL connection to mysql...
________
MOTORCYCLE TIRES
Last edited by david_labbe on Fri 18 Feb 2011 15:31, edited 1 time in total.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 06 Mar 2006 10:40

We don't have such working example at the moment. Specify please what the result is when you use client library. Have you tried Windows MySQL SSL Server?

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Mon 06 Mar 2006 12:05

I have tried windows mysql server, and the result is the same.

To summarize:

[Server]
- Linux SuSE Enterprise Linux Server
- MySQL Version 5.0.18 Build with SSL support

[Client]
- Windows XP Pro
- MySQL Client Library for MySQL v5.0 set in C:\Windows\System32 thus in the PATH. (Trials with the client library set in the directory where the main executable is resulted in the same problem)
- OpenSSL for W32 v0.98 set on client machine with ssl (libssl32.dll, libeay32.dll, ssleay32.dll) libraries in C:\Windows\System32
- MyDAC v4.30

[Certificates]
Certificates generated on the server and CA certificate, client certificate and client key copied onto the client machine. Tests have been conducted successfully with another mysql client (EngInSite Mysql Client v1.4.9) application with built-in ssl capability. The connection to the remote MySQL database using SSL authentication with the generated certificates worked perfectly.

[TMyConnection]
In Delphi program, TMyConnection component is set with the following properties:
- Options Direct := false
- Options Protocol := mpSSL
- SSLOptions CACert := cacert.pem (the generated CA certificate)
- SSLOptions Cert := client-cert.pem (the generated client certificate)
- SSLOptions Cypher := EDH-RSA-DES-CBC3-SHA
- SSLOptions Key := client-key.pem (the generated key)
- Username and password set appropriately

[Error Symptoms]
Upon attempting to set the property Connected of the TMyConnection object, an error dialog box is raised WITH NO MESSAGE IN IT

[Attempt to solve the problem]
- Various versions of the MySQL client library have been used, without any changes in the result. The versions used all are for MySQL > 4.0 when SSL authentication was added to MySQL
- Various versions of the ssl libraries have also been used without any success, the consequences being the same.

[Conclusions]
1 - Have you tested the SSL capability at all in your component? The fact that you do not have a working example leads me to believe you have not!
2 - If I set the Options - Direct property to true, I get an error that strikes me as a programming error in the MyDAC Component:
Assertion failure d:\Projects\Delphi\Mydac\Source\MySqlVioTcpSSL.pas, line 87).
Thus prompting me to believe that this part of the code was not tested as it should have
3 - When setting the above property to false, the error dialog does not even give me a message!

I know I am repeating myself but could you help please!!!

I could send you a snapshot picture of my desktop where you would see that all the libraries are set in the right places and the properties of the component in delphi set up appropriately...
________
Nevada medical marijuana
Last edited by david_labbe on Fri 18 Feb 2011 15:31, edited 1 time in total.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Mon 06 Mar 2006 12:20

Could you give a pointer to the various libraries you used for the testing of the component.
I would be particularly interested in:
libmysql.dll
ssleay32.dll
libssl32.dll
libeay32.dll.

What version did you use to get it to work?
Where did you get them from?
The versions provided by mysql.org or openssl.org do not work with your component so I was wondering which build did you use?
________
Laos cooking
Last edited by david_labbe on Fri 18 Feb 2011 15:32, edited 1 time in total.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Wed 08 Mar 2006 00:10

Hello? I am sure you are extremely busy with all the posts but would it be possible to get some help here?

Cheers
________
Weed Vaporizers
Last edited by david_labbe on Fri 18 Feb 2011 15:32, edited 1 time in total.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Thu 09 Mar 2006 09:55

Is it possible to get some help? :(
________
HEMP MARIJUANA
Last edited by david_labbe on Fri 18 Feb 2011 15:32, edited 1 time in total.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 10 Mar 2006 09:49

We have reproduced this problem and fixed it. This fix will be included in the next MyDAC build, which will be available very soon.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Mon 13 Mar 2006 10:34

Antaeus wrote:We have reproduced this problem and fixed it. This fix will be included in the next MyDAC build, which will be available very soon.
Thanks. Can't wait to get the new version!.
________
Ferrari P History
Last edited by david_labbe on Fri 18 Feb 2011 15:32, edited 1 time in total.

GEswin
Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain
Contact:

Post by GEswin » Mon 13 Mar 2006 20:52

I would say it's fixed in release of last friday.

JonKerry

MySQL SSL Connection

Post by JonKerry » Tue 14 Mar 2006 11:51

Hi,

I am also having the same problem and believe to have the most uptodate version of your software.

I am running MySQL 5.0.18 on Linux Fedora with SSL enabled

When I try to connect with Direct Disabled I get an error about LibmySQL, HOw can I solve this?

I know that the certs and server are all working correctly because I have tested with NAvicat

Many Thanks

Jon

JonKerry

Further Info

Post by JonKerry » Tue 14 Mar 2006 12:06

I have also just tried a standard connection to the server and get a DBACCESS.RES linker error

JonKerry

SSL Connection Problems

Post by JonKerry » Tue 14 Mar 2006 12:25

I have now managed to get around the DBACCESS.RES error by copying the file into the program directory of the executable.

I am still unable to make the server connection using ssl. I get...


"MySQL API function is not linked. You should update MySQL client library (libmysql.dll)"

I have got a copy of the WIN32 version of the mysql server version that is running on the fedora server and copied the DLL to the exe locaton but still the same error

Please Help

Jon

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Re: SSL Connection Problems

Post by david_labbe » Wed 22 Mar 2006 11:00

JonKerry wrote: I am still unable to make the server connection using ssl. I get...


"MySQL API function is not linked. You should update MySQL client library (libmysql.dll)"

I have got a copy of the WIN32 version of the mysql server version that is running on the fedora server and copied the DLL to the exe locaton but still the same error

Please Help

Jon
Hi Jon,

I had a similar problem and got around it by finding another libmysql.dll version. Check the size of your dll. The one that give you this error is quite an old one and should be quite small in size. The one I got that works with ssl is about 1520k.
________
Gustav otto
Last edited by david_labbe on Fri 18 Feb 2011 15:32, edited 1 time in total.

JonKerry

Post by JonKerry » Wed 22 Mar 2006 12:46

Hi David,

The version i am using is the most uptodate i can found and came with the win32 version of the mysql server. It is version 5.0.18 and the dll is about 1.34mb

Where did you get your dll from?

Many Thanks

Jon

Post Reply