I can not load dll file on vps machine

Martian4x
21

I have a weird problem, I have dll import line on my local computer working fine, but the when I setup the same dll on the VPS windows machine the I'm getting "cannot call 'ReadIni', 'MQLMySQL' is not loaded. I have installed the libraries in the 

C:\Users\user_name\AppData\Roaming\MetaQuotes\Terminal\INSTALLATIONHASH\MQL5\Libraries directory.

Code

#import "MQLMySQL.dll"

weirdly it's working on my local pc with directory
C:\Program Files\MetaTrader 5\MQL5\Libraries

Local pc: Windows 10 x64

VPS: Windows server 2019 x64

dll: MQLMySQL.dll

The error message on vps: 2022.06.23 15:41:59.070 MYSQLINTER (AUDNZDb,M5) Cannot load 'C:\Users\vpsuser\AppData\Roaming\MetaQuotes\Terminal\6FDE27AB8905AD69A01A421FFD46289B\MQL5\Libraries\MQLMySQL.dll' [126]

Any idea what is causing the dll not load?


Sergey Golubev
Moderator
126206
Sergey Golubev  

If it is about dll on MQL5 VPS (and if you are talking about MQL5 VPS) so any dll is prohibited on this type of VPS.
According to the rules here:

No DLLs are allowed on a Virtual terminal. There is no physical capacity to use DLLs there.

If a program launched on a Virtual terminal tries to call a function from any DLL, this EX4/EX5 program is immediately stopped due to a critical error. Any DLL calls are forbidden.

Rules of Using the Virtual Hosting Service
Rules of Using the Virtual Hosting Service
  • www.mql5.com
The page contains the rules of using the Virtual Hosting service (Virtual Hosting Cloud): general provisions, virtual hosting rental conditions, payment terms, as well as violations entailing termination of service.
Sergey Golubev
Moderator
126206
Sergey Golubev  

Well ... what to do?
There is no refund for this MQL5 VPS (in case you already paid for that).
But I found some option related to it:

Forum on trading, automated trading systems and testing trading strategies

...

Slava , 2019.02.20 07:45

If you cancel a paid subscription, the remaining time is returned to your MQL5.com account in the form of "free" minutes. Which later can be spent on a new subscription "for minutes."
Martian4x
21
Martian4x  
The Virtual Server I'm using is not MQL5 VPS. It's my own server from Google cloud. It doesn't have any restrictions.
Carl Schreiber
Moderator
13948
Carl Schreiber  
  1. Have you checked the rights to access files from elsewhere on your vps?
  2. Can you access (by a test script) this dll or other library files in that library?
  3. One terminal ist started in portable mode but not the other - correct?
Martian4x
21
Martian4x  
Solved It.
I found out  MQLMySQL.dll had no problem at all, the problem was on libmysql.dll. The libmysql.dll was not compatible with OS. So I downloaded a latest version and everything worked as it should. So remember to have compatible versions and sometime error messages can be misleading. 
Download Libmysql.dll for Windows 10, 8.1, 8, 7, Vista and XP (32 Bit and 64 Bit)
  • 2014.02.28
  • www.dlldownloader.com
 The Libmysql.dll library is 4.23 MB for 32 Bit , 4.5 MB for 64 Bit . The download links are current and no negative feedback has been received by users. It has been downloaded 47784 times since release and it has received 4.5 out of 5 stars .   The last version of the Libmysql.dll library is the 5.6.21.0 version for 32 Bit and the 5.6.17.0...