Page 1 of 1

Windows OK but Linux Can't connect to MySQL server

Posted: Sat 30 Nov 2019 13:12
by joolan
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

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

Posted: Sat 30 Nov 2019 16:38
by joolan
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

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

Posted: Mon 02 Dec 2019 05:39
by ViktorV
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}