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

 

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. 

 

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

 
markSearson:

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

First of all, make sure that you have dll loaded (no error 126 or so), then set the socket = ""; but not NULL

Next, the library has variable  SQLTrace you can set to true and see the logs of errors. 

Depends on logs you see, you would be able to check MySQL documentation for solving issue.

 

hello  Eugeniy 

I just started programming in MQL5, and trying out this mysql in MQL5, 

i already copied x64 bit version into libraries folder and getting strange error, perhaps if you or anyone can help with the problem. 

i will attach screen shot below

https://c.mql5.com/3/359/mysqlerror.png

thx

Files:
mysqlerror.png  49 kb