Windows OK but Linux Can't connect to MySQL server

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
joolan
Posts: 2
Joined: Sat 30 Nov 2019 12:51

Windows OK but Linux Can't connect to MySQL server

Post by joolan » Sat 30 Nov 2019 13:12

Hi,

I'am using MyDAC 7.2.7 on a Lazarus project for Windows and Linux.
Everything is OK

I purchase yesteday the new version of MyDAC 10.1.2 and compile again my project.
Under Windows it's OK.
Under Linux, I get an error : Can't connect to MySQL server on 'localhost' (10061)

It's exactly the same source code.

Do I need to set something new for Linux ?

Thank you for your help.

Serge

joolan
Posts: 2
Joined: Sat 30 Nov 2019 12:51

Re: Windows OK but Linux Can't connect to MySQL server

Post by joolan » Sat 30 Nov 2019 16:38

I found the difference.

I don't know why, but it requires now to add "cthreads" as the first unit in the main program uses.

Serge

ViktorV
Devart Team
Posts: 2803
Joined: Wed 30 Jul 2014 07:16

Re: Windows OK but Linux Can't connect to MySQL server

Post by ViktorV » Mon 02 Dec 2019 05:39

Thank you for the interest to our product.
We are glad to know you have found the answer.
To resolve the problem, in the project file ( with the *.lpr extension) add the following string: {$DEFINE UseCThreads}, before {$IFDEF UNIX}{$IFDEF UseCThreads}

Post Reply