MySQL Forums
Forum List  »  Newbie

Can't connect Delphi to MySQL
Posted by: Yossu Bonkers
Date: November 07, 2022 11:44AM

I am a seasoned developer, but new to the Delphi and MySQL stack.

I installed the latest version of Delphi on a Windows 11 machine and want to connect to MySQL. I installed the latest MySQL, but when I try to connect via the Delphi Data Explorer, I get an error saying that libmysql.dll cannot be loaded, and that I should check it is in the PATH, and that is has x86 bitness.

The folder C:\Program Files\MySQL\MySQL Server 8.0\lib has such a DLL, and this folder is in my path, but the DLL in there is 64-bit, not 32-bit.

There are quite a few posts about this around, and most of them seem to imply you need a 32-bit version of the DLL, but that the only way to get this is to download a copy from a 3rd party site.

I tried this, but ran into other issues. Even when I found a 32-bit DLL that got me past the above error, I ran into another error about not being able to use caching_sha2_password.

After yet more searching, and failed tweaking, I completely uninstalled MySQL and reinstalled, this time opting to use the legacy authentication, which (I think) should avoid this issue.

However, now I'm back to the first error.

Can anyone explain how I sort this out. I've wasted two days now just trying to connect Delphi to MySQL, but haven't got as far as a single line of code.

Thanks very much.

Options: ReplyQuote


Subject
Written By
Posted
Can't connect Delphi to MySQL
November 07, 2022 11:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.