Discussion of article "How to Access the MySQL Database from MQL5 (MQL4)" - page 26

 
Ana Fonseca:
in which folder do I save the DLL?
Here is the complete DLL update package: https://github.com/elugovoy/MQLMySQL-Project
includes compiled dlls located in the metatrader folder structure
 

Hello  Eugeniy,

can you provide a 64-version of MQLMySQL.dll. When loaded, mt prompts 

'C:\Users\ddy\AppData\Roaming\MetaQuotes\Terminal\A82A50F46FD795A059C2382724C7195E\MQL5\libraries\MQLMySQL.dll' is not 64-bit version
Cannot load 'C:\Users\ddy\AppData\Roaming\MetaQuotes\Terminal\A82A50F46FD795A059C2382724C7195E\MQL5\libraries\MQLMySQL.dll' [193]
 
Xiaowei Yan:

Hello  Eugeniy,

can you provide a 64-version of MQLMySQL.dll. When loaded, mt prompts 

Sure, you can download compiled x64 DLLs from GitHub: https://github.com/elugovoy/MQLMySQL-Project/tree/master/MQLMySQL/x64/Release

Full repository of project: https://github.com/elugovoy/MQLMySQL-Project

Regards,

Eugene

elugovoy/MQLMySQL-Project
elugovoy/MQLMySQL-Project
  • elugovoy
  • github.com
MQL & DLL libraries for working with MySQL database - elugovoy/MQLMySQL-Project
 

Hello   Eugeniy,

I was wondering if there is a way changing the code of reading the settings from the file 

// reading database credentials from INI file
 Host = ReadIni(INI, "MYSQL", "Host");
 User = ReadIni(INI, "MYSQL", "User");
 Password = ReadIni(INI, "MYSQL", "Password");
 Database = ReadIni(INI, "MYSQL", "Database");
 Port     = (int)StringToInteger(ReadIni(INI, "MYSQL", "Port"));
 Socket   = ReadIni(INI, "MYSQL", "Socket");
 ClientFlag = CLIENT_MULTI_STATEMENTS; 

and use this assignment instead 

Host = "127.0.0.1";
User = "mt4";
Password = "mt4";
Database ="mt4";
Port     = 3306
Socket   = 0
ClientFlag = CLIENT_MULTI_STATEMENTS; 

is it is possible, as I am getting error message as Access violation read 0x00000000 MQLMySQL.dll

Any possible solution?

 
heere:

Hello   Eugeniy,

I was wondering if there is a way changing the code of reading the settings from the file 

and use this assignment instead 

is it is possible, as I am getting error message as Access violation read 0x00000000 MQLMySQL.dll

Any possible solution?

Host = "127.0.0.1";
User = "mt4";
Password = "mt4";
Database ="mt4";
Port     = 3306;
Socket   = "0"; // this variable must be string, but not int
ClientFlag = CLIENT_MULTI_STATEMENTS; 

maybe this help

 
MARCOS DALCIN ALVES DINIZ:

It worked after I updated the version of OpenSSL. Thanks for listening.

Hi~

I also had the error question of [126]:


Cannot load'C:\Users\programer01\Desktop\MyMT5\MQL5\Libraries\MQLMySQL.dll' [126]

Cannot call'cMySqlVersion','MQLMySQL.dll' is not loaded

unresolved import function call


MARCOSmentioned that it is normal after updating the OpenSSL version

How can I update the OpenSSL version?

Thank you! ~



PS.

Because I am not familiar with this field

I want to ask again

I see that there are three dll files in your Libraries folder

1.libcrypto-1_1-x64.dll

2.libmysql.dll

3.libssl-1_1-x64.dll


I have installed MySQL software

Are these dll files copied from the path under ..\Program Files\MySQL?

If so, which folder was copied from?


 
zboo:

Hi~

I also had the error question of [126]:


Cannot load'C:\Users\programer01\Desktop\MyMT5\MQL5\Libraries\MQLMySQL.dll' [126]

Cannot call'cMySqlVersion','MQLMySQL.dll' is not loaded

unresolved import function call


MARCOSmentioned that it is normal after updating the OpenSSL version

How can I update the OpenSSL version?

Thank you! ~



PS.

Because I am not familiar with this field

I want to ask again

I see that there are three dll files in your Libraries folder

1.libcrypto-1_1-x64.dll

2.libmysql.dll

3.libssl-1_1-x64.dll


I have installed MySQL software

Are these dll files copied from the path under ..\Program Files\MySQL?

If so, which folder was copied from?


Can anyone help me solve the same situation?

Thank you~~~~

 
Eugeniy Lugovoy:

maybe this help

Thanks alot. It solved the problem. 

 

@Eugeniy Lugovoy

Good afternoon, Eugeniy. Thank you very much for the article. Could you please advise me? I have encountered the following problem: the dll works fine if I run the EA not on the tester. On the tester it gives the following error: "Cannot load 'C:\Users\...\MQL5\Libraries\MQLMySQL.dll' [126]". This makes it impossible to test the EA on historical data.

Problem context: I use the database to load input parameters for trading. I also save the necessary information after trading. The error is only on the tester.


What I have tried to do:

- add #property tester_library "MQLMySQL.dll"

- write the path to the dll separately in its entirety

- double-checked whether the file that is not loaded is in the folder.

Nothing helps, the file is in the folder, but I can't load it. Please tell me where else I can dig.

 

Please can someone confirm is I'm using the right connection string 

I'm using "127.0.0.1" for the host

I'm using the user , pass , and database in quotes ( 3 seperate parameters )

I'm then puttting NULL for the socket and 0 for the client flag.

( My system is Win 10 )


I get an error saying no database connection when I try to execute an insert