MySQL client connections (they don't see libmysql.dll) lazarus / 16-Databases ---------------------------------------------------------------------- Vittorio · 2020-07-28 06:59 Dear colleagues, What I have to do to provide my Lazarus program with access to the MySQL database? It works perfect from my computer and from IT's ones but cannot connect from others. libmysql.dll lies next to EXE-file but EXE-file doesn't see library and raises "Can't load default MySQL library "libmysql.dll" error. Am I right that insalling MySQL from https://dev.mysql.com is the only solution? Are there some simplier options? Thanks in advance. ---------------------------------------------------------------------- JernejL · 2020-07-28 07:24 usually libmysql is linked to visual studio runtime dependancies, so you need to install correct visual studio runtimes and the dll itself. usually this manifests as if the dll is not found, because due to dependancies it will not load. ---------------------------------------------------------------------- Vittorio · 2020-07-28 09:13 It means that I have to install MySQL in "Client only" mode at every PC that I want to use for my program? ---------------------------------------------------------------------- af0815 · 2020-07-28 09:22 ... and use the correct bitness. The dll must normally reside on two places - in the dir of the lazarus exe to use at designtime (with the bitness of lazarus) and later in the dir of the compiled exe or  in the system searchpath of libs. It is posible to say SQL-DB or ZEOS where the dll resides. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   // In ZEOS         SQLConZEOS.DBLibLibraryName := 'driver.dll';  // Kompatibel mit Zeos  // In SQLDB       SQLConSQLDB.LibraryLocation:= 'driver.dll'; You can also spezify dir names, but not relative. I have found out it works best with only full qualified path+filenames. At startup you didnt know where the actual startingpoint is. An extra goal on windows - you must have the correct rights in the installation dir and the dlls.  And you must test or work with an dependencies walker for the correct dependencies of your used libs. Use an installer is a good option after this, to fullfill the requirements. Quote from: Vittorio on July 28, 2020, 11:13:10 amIt means that I have to install MySQL in "Client only" mode at every PC that I want to use for my program? You must only install the part you need for your app from the package. But you must know what you need and install correct with your installer. ---------------------------------------------------------------------- JernejL · 2020-07-28 10:17 Quote from: Vittorio on July 28, 2020, 11:13:10 amIt means that I have to install MySQL in "Client only" mode at every PC that I want to use for my program? no, just add the visual studio runtime installer that is needed - the msvcrxxxx dlls. you can upload dll somewhere and we can check which runtime you need. ---------------------------------------------------------------------- Vittorio · 2020-07-28 11:18 Thanks all! Is it possible to determine which runtime is needed if MySQL Server version = 5.5.XX and exe-file uses TMySQL57Connection? ---------------------------------------------------------------------- JernejL · 2020-07-29 07:41 Quote from: Vittorio on July 28, 2020, 01:18:12 pmThanks all! Is it possible to determine which runtime is needed if MySQL Server version = 5.5.XX and exe-file uses TMySQL57Connection? The runtime depends on the dll and how that dll from mysql was compiled, not the mysqlconnection. It can be checked by looking at the dll's import table. ---------------------------------------------------------------------- Vittorio · 2020-08-04 05:48 I've traced DLL dependences with 'Dependency Walker' but it says nothing to me  Maybe you could kindly help me to understand which runtimes do I need? 'Dependency Walker' image file is here. P.S. msvcr120.dll is missing. Am I right that MS Visual C++ 2013 Redistributable x64 is reqired? ---------------------------------------------------------------------- PascalDragon · 2020-08-04 07:09 Quote from: Vittorio on August 04, 2020, 07:48:48 amP.S. msvcr120.dll is missing. Am I right that MS Visual C++ 2013 Redistributable x64 is reqired? Yes, that's the VS 2013 one. Install that and try again. ---------------------------------------------------------------------- Vittorio · 2020-08-04 07:56 Perfect! That works!