Forum > Databases

zeos library connect mysql error

(1/2) > >>

Prakash:
None of the dynamic libraries can be found or is not loadable: libmysqld57.dll, libmysql57.dll, libmysqld56.dll, libmysql56.dll, libmysqld55.dll, libmysql55.dll, libmysqld51.dll, libmysql51.dll, libmysqld50.dll, libmysql50.dll, libmysqld41.dll, libmysql41.dll, libmysql.dll, libmysqld.dll, libmariadb.dll !
Use TZConnection.LibraryLocation if the location is invalid.

I have copied dll on project folder as well as lazarus folder , still getting same error message

af0815:
Only one small question - is the bitness 32bit/64bit correct too?

Thaddy:
One other question... did you actually install mysql? (or mariadb)
If one of those two are not there, of course it will not work.

Prakash:
I have not installed . just copied . it is 64 bit

Thaddy:
Certainly on Windows, do not use the current directory but install, depending on bitness in the proper directories: system32 for 64 bit (I KNOW, ask MS, this is not a typo), sysWOW64 for 32 bit dll's.

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---The reason for this seemingly counter-intuitive setup is due to **backward compatibility** reasons¹². Here's a more detailed explanation: - **System32**: Despite its name, the `System32` directory is reserved for **64-bit** applications on 64-bit Windows⁵. This is because many applications had hard-coded the `System32` path into their system, and when these were ported from 32-bit Windows to 64-bit Windows, they were looking for 64-bit executables and libraries in the `System32` directory². - **SysWOW64**: The `SysWOW64` directory, on the other hand, is intended for **32-bit** applications running on a 64-bit system¹. The term `WOW64` stands for "Windows 32-bit on Windows 64-bit". This directory ensures that 32-bit applications can access the 32-bit DLLs they need³. If a 32-bit program tries to load a 64-bit DLL, it would crash⁴. So, if you have a **64-bit DLL**, it should go into the `System32` folder, and if you have a **32-bit DLL**, it should go into the `SysWOW64` folder³. This setup ensures that applications can find the correct versions of DLLs they need, preventing crashes and improving compatibility⁴.  It's worth noting that for an installer, you should not hard-code the path to the system folder. Instead, let Windows take care of it for you based on whether or not your installer is running on the emulation layer¹. Source: Conversation with Copilot, 6/26/2024(1) Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit .... https://stackoverflow.com/questions/949959/why-do-64-bit-dlls-go-to-system32-and-32-bit-dlls-to-syswow64-on-64-bit-windows.(2) Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on ... - IBM. https://www.ibm.com/support/pages/why-do-64-bit-dlls-go-system32-and-32-bit-dlls-syswow64-64-bit-windows.(3) File System Redirector - Win32 apps | Microsoft Learn. https://learn.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector.(4) Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit .... https://www.matheusmello.io/posts/windows-why-do-64-bit-dlls-go-to-system32-and-32-bit-dlls-to-syswow64-on-64-bit-windows.(5) What's the Difference Between the "System32" and "SysWOW64" Folders in .... https://www.howtogeek.com/326509/whats-the-difference-between-the-system32-and-syswow64-folders-in-windows/.There are many morons on this forum that will advise you the other way around. Above is Microsoft's answer.

For debugging you usually can get away with putting the dll in the program directory and that only can fail if a) the bitness is not correct or b) the dll needs to be registered (a COM dll) or reads registry settings.
I strongly advise to do an install for mysql or mariadb. It is the easy way out.

Navigation

[0] Message Index

[#] Next page

Go to full version