Page 1 of 1

#08501 BAD HANDSHAKE

Posted: Tue 10 May 2011 17:41
by airic
Error when trying to connect to database.

Delphi 7 - mydac 5.90.0.56
I have just updated from mysql 5.0.95 to mysql 5.1.57.
Error did not occur prior to update.
Error does not occur when using the root@localhost login.

When I try to use a common user name the error occurs.
[email protected]

Exception: When turning off the direct connect option the connection works.

Very easy to recreate. Drop the myconnection onto a form. Double click the myconnection component on the form. An options window appears to connect. Fill in a user you have added to mysql and click connect. Error will occur immediately.

Any one have any suggestions.

stepping through the connection

Posted: Tue 10 May 2011 18:05
by airic
The code error is mysql error 1043.
Did a internet search on this error and found a lot information from mysql.

Hope this helps.

Posted: Tue 10 May 2011 19:01
by cybsistemas
Sqlyog works fine with Mysql 5.5.12 (32 and 64)
Mydac works fine with MySql 5.5.11 (32 and 64)
Mydac error with MySQL 5.5.12 (32 and 64)

Sqlyog works fine with Mysql 5.1.57
Mydac error with MySQL 5.1.57

Version problem

Posted: Tue 10 May 2011 20:42
by airic
Connection works with MYSQL 5.1.53

thanks

Posted: Wed 11 May 2011 09:38
by Dimon
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next MyDAC build.

Posted: Wed 11 May 2011 19:03
by garik
I'm having the same issue.
When is shceduled the next update release?

Posted: Thu 12 May 2011 10:12
by Dimon
New build of MyDAC version 6.10.0.7 has been released. Bug with the "BAD HANDSHAKE" error was fixed in this build.

Posted: Fri 27 May 2011 09:18
by tkubica
I have still "BAD HANDSHAKE" error with 6.10.0.7. D2009 (Mysql 5.1.57 or 5.5.12 x64).

Posted: Fri 27 May 2011 13:21
by AndreyZ
Please try the following:
- close RAD Studio 2009;
- remove MyDAC;
- remove all *dac*.bpl files from your computer;
- remove all dcu files from your project;
- reinstall MyDAC and check that it's version 6.10.0.7 (you can learn it from the About sheet of TMyConnection Editor).

Posted: Wed 01 Jun 2011 12:30
by tkubica
I do all:
- close RAD Studio 2009;
- remove MyDAC;
- remove all dac bpl files from my computer;
- remove all dcu files from my project;
- reinstall MyDAC and check that it's version 6.10.0.7 and check it
and still have this same error. I trie many time do this same without effects. (mysql 5.5 x64, d2009)

Posted: Thu 02 Jun 2011 09:11
by AndreyZ
I've checked MySQL servers 5.1.57 and 5.5.13, x32 and x64 versions. There were no problems with connecting to them using MyDAC version 6.10.0.7. Please check that you don't have old MyDAC sources.

Posted: Wed 15 Jun 2011 08:15
by GeuzeAut
Hi. I have the same problem with the newest version.

MySQL: 5.5.13 (x32)
MyDAC: 6.10.0.7
Windows XP
Delphi 2009

Removed old MyDAC complete, removed the bpl files, reinstalled, rebuild, but no luck: #08501Bad handshake

The connection fails only runtime, designtime connect work, runtime not.?

Tested:
1. New project
2. Drop MyConnection on form
3. Set connection to MySQL 5.5.13 (localhost in my case), select a DB
4. Connection works
5. Set designtime connected property to false
6. Drop button, with eventhandel myconnection1.connected := true
7. Error

Posted: Fri 17 Jun 2011 10:44
by AndreyZ
It really looks like you have old MyDAC sources. Please check that you don't have any links to old MyDAC sources (or dcu files) in Library Path and in your project options. This is the only explanation why you can connect in design-time, and cannot connect in run-time.