Cannot Connect to MySQL RunTime with D2006 / MyDAC 4.40

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
John Bell
Posts: 17
Joined: Mon 25 Sep 2006 17:38

Cannot Connect to MySQL RunTime with D2006 / MyDAC 4.40

Post by John Bell » Mon 25 Sep 2006 18:02

i have an app in which i can open MyConnection Designtime fine.
when i try to open it runtime, i get an error 10061 and then Lost
Connection to MySQL Server During Connection. Interestingly, i
have another app which works fine and the connection has the
same settings (check the dfm file). The settings are:
object MySQLConnection: TMyConnection
Database = 'afpconf'
Username = 'TheUser'
Password = 'happy'
Server = '192.168.1.2'
LoginPrompt = False
Left = 600
Top = 432
end

and

object MySQLConnection: TMyConnection
Database = 'afpconf'
Username = 'TheUser'
Password = 'happy'
Server = '192.168.1.2'
LoginPrompt = False
Left = 169
Top = 13
end

if i leave it connected in design time and then
run it, i get the same error which, this time seems
to occur before the datamodulecreate event.

the working app does not have the mysqlconnection
in a datamodule whereas the problem app does.

I am running MySQL 4.1. I have BDS2006E with
update 2 and hotfix 1, 3, 5. i have MyDAC 4.40.0.18
and SDAC 3.80 (which is not used in these apps).

This application ran a year ago under D2005E (if that
helps). In fact, it just ran correctly on a different computer
which has D2005E on it and MyDAC 4.00.16

Both computers have the same LibMySQL.DLL and LibMySQL_C.DLL
files on them.

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

Post by Antaeus » Tue 26 Sep 2006 08:54

Please simplify the application that fails on connect to maximum possible extent and send it to us (evgeniyD*crlab*com) for analysis.

John Bell
Posts: 17
Joined: Mon 25 Sep 2006 17:38

Not Connecting

Post by John Bell » Tue 26 Sep 2006 13:54

I am sending you a stripped down app which exhibits the same behavior. However, in creating this, i noticed that the exe created by D2006 ran on the other workstation. after some messing around, i then discoveredt that the exe would run as a standalone on the D2006 workstation (it does NOT run under the IDE on the d2006 workstation). hope you can figure this out. thanks.

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

Post by Antaeus » Wed 27 Sep 2006 11:17

We have reproduced described problem using the sample you have sent. The problem was solved by changing line

Code: Select all

'C:\WINDOWS'
to

Code: Select all

'D:\WINDOWS'
in afpconf.bdsproj file. "D:\WINDOWS" is the system root directory on our test computer.
Probably the .bdsproj file is misconfigured.

Post Reply