Bug #109349 "Could not load libmysql.dll" when using MYSQL 8.0.31
Submitted: 12 Dec 2022 23:36 Modified: 10 Jan 2023 12:54
Reporter: Lisha Jain Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: DDL Severity:S2 (Serious)
Version:8.0.31 OS:Windows
Assigned to: CPU Architecture:Any
Tags: MYSQl 8.0.31

[12 Dec 2022 23:36] Lisha Jain
Description:
Hi Team,
I am performance testing background and do the testing of various applications. Our testing data was stored in MYSQL 8.0.13 and scripting tool(Loadrunner - Virtual User Generator) was able to communicated with MYSQL using libmysql.dll to fetch and update the data from database in MYSQL.

Due to vulnerabilities, we have upgraded to latest version which is MYSQL 8.0.31. 
Now, when Loadrunner (Virtual User Generator) connects to MYSQL 8.0.31 we can see this error "Could not load libmysql.dll"

Below is the code:
int rc;
DBInit_OpenClose()
{
	// You should be able to find the MySQL DLL in your MySQL install dir.
	rc = lr_load_dll("Path\\Libraries\\MySQL\\libmysql.dll");
	lr_output_message("Return code is %d", rc);
}

Note: We have downloaded 8.0.31 (latest version) of MYSQL. File "libmysql.dll" from lib folder was placed in ("Path\\Libraries\\MySQL\\XXX")
XXX - libmysql.dll

Output:
Above code when executed gives:-
rc returns 11
As per the documentation below, 11 refers to "file was not found"
The lr_load_dll function returns 0 on success, 10 if an out of memory condition resulted, or 11 if the file was not found.

When I have placed libmysql.dll of MYSQL8.0.13, I don't see this error but can see different issue which is related to SSL issue (expected as we are using older version dll). This was tried to check if files had issue.

How to repeat:
Download MYSQL 8.0.31 and from Loadrunner tool try to connect to DB.
It will require dll file and place them in lib folder.

You should see the same error as return code is 11 (which means the file was not found)
[13 Dec 2022 12:45] MySQL Verification Team
Hi Mr. Jain,

Thank you for your bug report.

However, your report is not complete .....

Although Windows OS is not known for it's safety features, it still has privileges and rights for some users, while for some not.

Hence, first check that a directory where you have  DLL installed  is fully visible by the user which runs the client program.

Next, check the exact size and checksum of the DLL that you have downloaded with the one that you are trying to access.

Next, can you please explain, why does this report belongs to DDL category ???

Last, but not least,  this is a forum for MySQL bug reports with fully repeatable test cases. This also means that we do not support products from other companies, hence, please provide us with a test case that uses only our tools. We can not accept reports with third-party tools.

We are waiting on your full feedback.
[10 Jan 2023 1:31] Lisha Jain
Full privilege is provided at the path where dll file is placed.
This issue is reported as dll because with old version of dll MySQL v5.7 the connection was successful but with latest version MySQL v8.0.31 we see the file found issue.
[10 Jan 2023 12:54] MySQL Verification Team
Hi Mr. Jain,

We do not have such problems with our Windows installation.

You should check out that your C API include files and library are both from 8.0.31 and then you should check all the items that we asked you above ...... Check the owners of those directories and of the libraries as well as everything else that we asked you to do.

We do not see any answers to the questions that we have asked you ........

Can't repeat .....