Search code examples
mysqldelphilibrarieszeoslibmysql

Can't find libmysql.dll and others connecting to MYSQL from ZeosLib in Delphi


Excuse me, I would like to ask about how can I connect Delphi with MYSQL with ZeosLib. I already know the steps but I can't get it yet cause when I change the Properties in ZConnection where Connection = True, it can't. And this is the message enter image description here

By the way, my OS actually Linux Ubuntu and I have to use VirtualBox to work on it. So if there's somebody know this, I'm begging you guys to help me.


Solution

  • You need to download the dynamic link library that the error message is referencing. The following link https://dev.mysql.com/downloads/windows/installer/8.0.html takes you to MySQL Download page for the latest version of MySQL 8.0.13, or go to this page if you are on a 5.X version https://dev.mysql.com/downloads/installer/

    Download the appropriate file 32bit or 64 bit and install it. Find the installed libMySQL.dll and put that file in the same directory as the executable being created by Delphi

    You may instead set the Zeos Connection Component's Library Location property to the directory that the dll is located in.