MySQL and SSL connection
-
david_labbe
- Posts: 39
- Joined: Wed 01 Mar 2006 15:27
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
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
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
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.
-
david_labbe
- Posts: 39
- Joined: Wed 01 Mar 2006 15:27
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
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
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
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
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
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
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
Thanks. Can't wait to get the new version!.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.
________
Ferrari P History
Last edited by david_labbe on Fri 18 Feb 2011 15:32, edited 1 time in total.
-
JonKerry
MySQL SSL Connection
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
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
I have also just tried a standard connection to the server and get a DBACCESS.RES linker error
-
JonKerry
SSL Connection Problems
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
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
Hi Jon,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
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