PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Connecting to MySQL
Connecting to MySQL
Iniciado por life2ice3, 19,abr. 2022 21:47 - 2 respuestas
Publicado el 19,abril 2022 - 21:47
Hi there. I am aware that this has been covered many times, but none of the solutions I've followed so far have worked for me.

The first advice that is given is to locate the libmysql.dll file (which I have done) and then put it in some certain directories. Either the exe folder of the project or the project folder...? The exact quote is this: "you have to copy the LIBMYSQL.DLL from your mysql bin directory to the directory of your executable or project." I have a project called My_Project1 and within that folder is an 'Exe' folder. I presume this is the one? Well I have copied the file to that location and it has not fixed anything.

As for the specifics of what it is I'm trying, it's the most basic version (as far as I know). That is, I have this project (My_Project1) with nothing in it. I create a new data file and select the 'Use the data files of an existing database' option. Then check 'MySQL' in the list, then define the connection. I should mention that MySQL is running on my local machine and is logged in. I use details that I know are right (as I use them to log into MySQL). But it gives me this:

Unable to connect to localhost.
native MySQL access error.
Error number = 27

The MySQL client layer may not be installed properly.
No access library to MySQL was found, the libmysql.dll module (32 bits) or one of its dependencies was not loaded.

I read a little further into this, and came up with yet more suggestions. The first was to put the libmysql.dll file in the 'programs' folder in the Windev 26 Express directory. I did that, no change. Then someone suggested I needed to download and run this other program from this website called MSQL27PACKDVD055.exe. This creates a folder within my c: called WD27MySQL. How does this relate to the original libmysql.dll? I don't know really to be honest. Now that particular program does a 100mb install and I'm not sure what it does, but in that directory are just two DLLs (total 2MB in size). What do I do with these? Do I have to move them somewhere? Also is it a problem that this version says it's for Windev 27 but I'm using 26 Express?

I'll be honest I don't really know what I'm doing wrong here, but nothing has worked so far.
Publicado el 20,abril 2022 - 12:48
You should review all the possible causes for error 27 listed here:
http://fabriceharari.com/UK/Page_Article.awp…

Fabrice has done a good job with this checklist...
Considering what you already tried, I'm leaning toward the 32/64 bits problem... but I may be mistaken

For that problem, you need to know: how you installed WinDev (32 or 64 bits for the windev EDITOR) and use the same type of dll (in your message you are talking about the 32 bits dll, so if you installed the 64 bits version of windev, that wont work)
Miembro registrado
7 mensajes
Publicado el 26,abril 2022 - 20:35
Hi John,
First, work on Argus advice and see whether you are 32 or 64
Then:
A. Where to obtain libmysql.dll from (it is "Program Files" or "Program Files (x86)" for 64 or 32 bits respectively):
C:\Program Files\MySQL\MySQL Server 8.0\lib\libmysql.dll
C:\Program Files\MySQL\MySQL Workbench 8.0 CE\libmysql.dll
C:\Program Files\MySQL\MySQL Router 8.0 CE\libmysql.dll

B. Target directories:
Windev environment
64 bit
C:\Program Files\PC SOFT\WINDEV 24\Programs
32 bit
C:\Program Files (x86)\PC SOFT\WINDEV 24\Programs\Framework\Win32x86

Program in production
64 bit
<Haven't checked yet...>
32 bit
C:\Program Files (x86)\<Your program directory>\
C:\Program Files (x86)\<Your program directory>\

Hope it'll work for you too.
All the best
/Jacek