Jump to content
Sonjli

D11.2 + FireDAC + MySQL 64 bit not working

Recommended Posts

Hello,

I attach a stupid D11.2 project with FD on MySQL compiled in 32 and 64 bit windows.

Simple connection to mysql using libmysql.dll 32 and 64.

With 32 everything is ok, with 64 it is not working.

Before you ask:

- FDDrivers.ini is located only in one place with nothing inside (it is the base embarcadero file)

- In the source you can see my connection params

- I don't use TFDPhys... because I want my exe to use local (same exe path) DLLs

- I followed Embarcadero guidelines (vs2015 runtime, etc.)

- I tryed with libmysql.dll from 8.x and 5.x (also the 5.7.29 as Embarcadero says), but same bad results

 

Link to archive: https://we.tl/t-8ydNpkhi5u

(If link is gone, tell me!)

 

Any idea?

 

Thanks

Edited by Sonjli

Share this post


Link to post

do you try this, too?  "FDDrivers.ini " NOT EMPTY!!!

Quote
Note: If you use a 64-bit SQL server, the client DLLs will also be 64-bit. To connect at design time or to use this server with a 32-bit application, download 32-bit DLLs from http://dev.mysql.com/downloads/connector/c/#downloads

Alternatively you may put the required files in any other folder, and specify their path in FDDrivers.ini:


[MySQL]
VendorLib=<folder>\libmysql.dll

If the MySQL client library has not been installed properly, an exception is raised when you try to connect:

[FireDAC][Phys][MySQL]-314. Cannot load vendor library [libmysql.dll]. The specified module could not be found. Check [libmysql.dll], which is located in one of the PATH directories or in application EXE directory.

 

Edited by programmerdelphi2k

Share this post


Link to post

hi,

I have many 4.0 industry software made in D11x and MySQL

in Firedac I use libmysql.dll from the MySQL folder, this should be inserted in TFDPhysical vendorlib property

under Windows Server 2016, 2019, 2022 works fine

you have to setup microsoft visual c runtime before https://learn.microsoft.com/it-it/cpp/windows/latest-supported-vc-redist?view=msvc-170

 

 

  • Like 1

Share this post


Link to post
On 12/14/2022 at 6:24 PM, RDP1974 said:

hi,

I have many 4.0 industry software made in D11x and MySQL

in Firedac I use libmysql.dll from the MySQL folder, this should be inserted in TFDPhysical vendorlib property

under Windows Server 2016, 2019, 2022 works fine

you have to setup microsoft visual c runtime before https://learn.microsoft.com/it-it/cpp/windows/latest-supported-vc-redist?view=msvc-170

 

 

Hi, Thanks.

Did you try to download the 7z archive and run the executable at Win64? It is not running on any machine. I did the VC2015 setup and set the VendorLib, too, but nothing changes. Win32 is ok, Win64 give the error:

[FireDAC][Phys][MySQL]-314. Cannot load vendor library [libmysql.dll]. The specified module could not be found. Check [libmysql.dll], which is located in one of the PATH directories or in application EXE directory.

Share this post


Link to post

my test using MySQL 8.0.26 Community + RAD 11.2 Alexandria + FireDAC + LibMySQL.dll (libcrypto-1_1-x64.dll, libssl-1_1-x64.dll) (64bits) + App in 64bits

  • NONE DLL on \Windows\SystemXXXX
  • NONE PATH MySQL defined
  • NONE FDDrivers.ini definition!  just default by RAD
    • [FDDrivers.ini]
      • Encoding=UTF8
  • LibMySQL.DLL, libcrypto-1_1-x64.dll, libssl-1_1-x64.dll on exe folder
Quote

  object FDConnection1: TFDConnection
    Params.Strings = (
      'Database=classicmodels'
      'User_Name=root'
      'Password=password'
      'DriverID=MySQL')

procedure TForm1.Button1Click(Sender: TObject);
begin
  FDPhysMySQLDriverLink1.VendorLib := 'libmysql.dll';
  //
  FDConnection1.Open;
  if FDConnection1.Connected then
    begin
      FDQuery1.Open('select * from customers');
    end
  else
    ShowMessage('not connected')
end;

image.thumb.png.8015c5119218c9f6a740604ff5cef5d9.png image.png.5949d036b255dda8cf21206208aadbdc.png   image.thumb.png.018e7f2ecfdbe50a4f7d13880c134bb9.png

 

Tip: RAD Studio IDE works in 32-bit, that is why it cannot connect with MySQL 8.0, wich is only available in 64-bit. To avoid this connection issue you can use MySQL 5.7.29, which is the most recent 32-bit version of MySQL.

Edited by programmerdelphi2k

Share this post


Link to post

YOU CAN definitely connect "MySQL 64Bits" and "RAD Studio IDE" by Ian Barker

image.thumb.png.4f8b403b4f4af0358beccad62988aa31.png   <--- this comment is on video from Ian Barker, it's not mine!

 

 

Edited by programmerdelphi2k

Share this post


Link to post

How the bitness of server relates to bitness of client? Nobody requires you to access x64-Apache-driven website with strictly x64 browser.

Share this post


Link to post
26 minutes ago, Fr0sT.Brutal said:

How the bitness of server relates to bitness of client? Nobody requires you to access x64-Apache-driven website with strictly x64 browser.

You really never heard of amd-x64.google.com or itanium64.en.delphipraxis.net? 😄

  • Haha 2

Share this post


Link to post
19 hours ago, programmerdelphi2k said:

YOU CAN definitely connect "MySQL 64Bits" and "RAD Studio IDE" by Ian Barker

image.thumb.png.4f8b403b4f4af0358beccad62988aa31.png

Please delete any incorrect information in your previous comments. 

Share this post


Link to post
On 12/20/2022 at 11:39 AM, programmerdelphi2k said:

Tip: RAD Studio IDE works in 32-bit, that is why it cannot connect with MySQL 8.0, wich is only available in 64-bit. To avoid this connection issue you can use MySQL 5.7.29, which is the most recent 32-bit version of MySQL.

this is on HELP from RAD Studio, it's not mine comment! 

That's why "Ian Barker" (Embarcadero MVP) is even embarrassed to say that Embarcadero got it wrong once again!!!

Share this post


Link to post

NOTE: I CANNOT DELETE OLD COMMENT BECAUSE IT'S NOT POSSIBLE DELETE OLDER POST!

 

Dont stalk me! please! :classic_blush:

Edited by programmerdelphi2k

Share this post


Link to post

I stalk everyone. That is the job of admins and mods.

If you can't edit or delete the comment anymore - just PM me with the comments you want removed.

 

Also - large fonts and colors does not improve communications.

 

I am having a deja-vu here...

Share this post


Link to post

remove the options from "menu", or define "just one option to choice" (no color, no size, no nothing...), it's done! :classic_tongue:

is it really necessary all this?

Edited by programmerdelphi2k

Share this post


Link to post
44 minutes ago, programmerdelphi2k said:

odstráňte možnosti z "menu" alebo definujte "len jednu možnosť na výber" (žiadna farba, žiadna veľkosť, nič...), je to hotové! :klasický_jazyk:

je toto vsetko naozaj potrebne?

Those possibilities are justified. They should be used with caution. When I see those huge and bold texts with parrot colors, I don't feel comfortable.

Share this post


Link to post

if "it" in your mouth, then it should be! :classic_cheerleader: ha ha ha ha...  (you lost the line of good-sense...)

it's over for me! PERIOD!

Edited by programmerdelphi2k

Share this post


Link to post

hi,

I use D11.x with MySql 8.x both in 32 and 64bit.

You have to use the DLL found into bin folder of the MySql installation and put it into fdphysical lib name.

If your system is virgin then install the runtime of visual c.

https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist

put at runtime the 64bit lib $ifdef win64 ... and develop with 32bit

Install mysql 32 for 32 dll and mysql 64 for 64 dll

Edited by RDP1974

Share this post


Link to post
On 1/20/2023 at 2:46 PM, aehimself said:

You really never heard of amd-x64.google.com or itanium64.en.delphipraxis.net? 😄

amd-x64.nvidia-geforce.ms-win7.asus-monitor.genius-mouse.logitech-keyboard.en.delphipraxis.net 🙂

  • Haha 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×