Page 1 of 3

MySQL and SSL connection

Posted: Wed 01 Mar 2006 15:36
by david_labbe
Hi,

I have been using successfully the MySQL access components until now. we are moving our database to a secure server. Thus MySQL now uses SSL for the users. I cannot manage to get the connection established with TMyConnection. When I set the SSLOtions with the appropriate certificates and keys and adjust the Options/Protocol to mpSSL, it seem to truncate the mysql user name:

I get the following error:

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

I would have expected [...] for user 'david'@'192.168.0.10' [...]

Of course, the password is set correctly and the certificates and keys are the right ones...

Can you help?

Please don't tell me to refer to the MySQL documentation. I have done that profusely and the problem does not seem to reside there... I can access the database from a shell on the server using the same certificates , keys, ... and it works fine...

If you had working examples of an SSL connection to MySQL, I think it might help.

Cheers
________
HALF-BAKED

Posted: Thu 02 Mar 2006 10:56
by david_labbe
Following the headache I have had, I tried several options.
I checked the ssl libraries are present on the client machine (don't know much about ssl so I thought it might be an issue). I installed OpenSSL anyway.

I tried another MySQL connection component and had to uninstall the crlab ones (conflict of components)... unsuccessfull...
I thus reinstall the crlab components after uninstalling the other ones and I now get a strange error when attempting an ssl connection:


Assertion failure (d:\projects\Delphi\Mydac\Source\MySqlVioTcpSSL, line 87)

funny, I don't have a d drive...

Can anyone please help... I am getting desperate here...

Cheers

David
________
Marijuana Vaporizers

Posted: Thu 02 Mar 2006 12:26
by Antaeus
Specify please, do you use direct connection or not. Does the behaviour changes if you alter Direct option?

Posted: Thu 02 Mar 2006 12:33
by david_labbe
Tried to disable the Direct option and got the following message:

MySQL client library couldn't be loaded. Please place libmysql.dll file to system folder (include to PATH) or the folder with executable unit of main program.
________
Harley-davidson peashooter

Direct mode = False...

Posted: Thu 02 Mar 2006 12:38
by eduardosic
david_labbe wrote:Tried to disable the Direct option and got the following message:

MySQL client library couldn't be loaded. Please place libmysql.dll file to system folder (include to PATH) or the folder with executable unit of main program.

With TmyConnection.Option.Direct = False, requiries libmysql.dll, this files are in C:\mySQL\bin\libmysql.dll, put in System Path or in Application Folder.

Posted: Thu 02 Mar 2006 12:47
by Antaeus
Please copy file libmysql.dll from MySQL Server install path to the path where your project is. Then try again.

Posted: Thu 02 Mar 2006 17:00
by david_labbe
Tried setting up the libmysql.dll in the right place. Got the latest version (the mysql server is a linux box so no dll's available there) and put it in the right place.

I still get an error in the form of an error dialog box with nothing written in it.
________
Chrysler canada specifications

libmySQL ....

Posted: Thu 02 Mar 2006 17:27
by eduardosic
david_labbe wrote:Tried setting up the libmysql.dll in the right place. Got the latest version (the mysql server is a linux box so no dll's available there) and put it in the right place.

I still get an error in the form of an error dialog box with nothing written in it.
copy the file libmysql.dll to folder when the exe aplication is present

the application is writed in Delphi/Windows or kylix/Linux ?

Posted: Thu 02 Mar 2006 17:28
by david_labbe
I've done that... and my last post was the result...

The application is written in delphi/windows
________
Jugalettes

Posted: Thu 02 Mar 2006 17:30
by david_labbe
The first time around, I got a message telling me that the current version of the mysql client library was not up to date to do ssl authentication, so I upgraded it to the latest and get the dodgy error with no message at all...
________
SUZUKI RG250 SPECIFICATIONS

problem ...

Posted: Thu 02 Mar 2006 19:05
by eduardosic
david_labbe wrote:The first time around, I got a message telling me that the current version of the mysql client library was not up to date to do ssl authentication, so I upgraded it to the latest and get the dodgy error with no message at all...
the schema:

mySQL Server in a Linux Server,
exe Application in a Windows Station, requiries a libmysql.dll, please:

what version of mySQL server?
what version of libmysql.dll
what version of Delphi and myDAC.

it's probable a incompatible mySQL version and client library version.

run in console Select Version() for retrieve the version of mySQL.

Posted: Thu 02 Mar 2006 19:14
by david_labbe
Delphi 2005
MyDac 4.00.13
MySQL Server v5.0.18
libmysql.dll version for MySQL 5.0

Muito obrigado Eduardo por passar tempo no meu problema...
(I hope my portugues isn't to bad!)

I don't think it is a version problem. I have other apps using libmysql.dll on this version of MySQL server(5) that I loaded to test the library. They work fine. I haven't found anywhere any demos of MyDAC with MySQL and SSL... so it is difficult to know where the problem comes from. I also have a fair experience with programming and MySQL although I would not think of myself as a guru... however, I have tried all the tricks in the book and can't get the SSL connection to work at all using the MyDAC component...

Cheers
________
Pot News

humm. om

Posted: Thu 02 Mar 2006 21:27
by eduardosic
david_labbe wrote:Delphi 2005
MyDac 4.00.13
MySQL Server v5.0.18
libmysql.dll version for MySQL 5.0

Muito obrigado Eduardo por passar tempo no meu problema...
(I hope my portugues isn't to bad!)

meu Ingles que é ruim!!
(my English is bad - more ou less)

I don't think it is a version problem. I have other apps using libmysql.dll on this version of MySQL server(5) that I loaded to test the library. They work fine. I haven't found anywhere any demos of MyDAC with MySQL and SSL... so it is difficult to know where the problem comes from. I also have a fair experience with programming and MySQL although I would not think of myself as a guru... however, I have tried all the tricks in the book and can't get the SSL connection to work at all using the MyDAC component...

Cheers

Seu português está muito bom!!
(Its Portuguese is very good!!)

really this is a problem that the CoreLab only goes to be able to help it. please download the lest version of myDAC 4.30.0.10 and test it. . Good Luck.

Posted: Fri 03 Mar 2006 10:05
by Ikar
This problem can have following sources:
- Error in MyDAC Direct code. It's most probable. To check it you should connect using Direct = False mode.
- Error in MyDAC code common for Direct and Client modes. It's unlikely as MyDAC common code for SSL is very simple.
- Error in SSL configuration. To check it you should connect to the server using other SSL-client.
- Error in SSL implementation or in MySQL SSL server implementation.

Posted: Fri 03 Mar 2006 10:17
by david_labbe
Ikar wrote:This problem can have following sources:
- Error in MyDAC Direct code. It's most probable. To check it you should connect using Direct = False mode.
Tried that... see above posts...
- Error in MyDAC code common for Direct and Client modes. It's unlikely as MyDAC common code for SSL is very simple.
...
- Error in SSL configuration. To check it you should connect to the server using other SSL-client.
Just tried that with other clients such as navicat or EngInSite MySQL Client, both supporting SSL connection to mysql. I successfully connected to my DB in both instances.
- Error in SSL implementation or in MySQL SSL server implementation.
MySQL SSL server implementation is robust and works fine (I managed to connect successfully using SSL from external clients). Local implementation of SSL libraries is done using OpenSSL. As far as I am concerned, this was done by the book and works fine
________
SEXUAL DYSFUNCTION FORUMS