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

 
Is it possible to get the column name? thank you.
 

It doesn't run on MT5. It requires a different dll ? I see the size in the archives for both MT4 and MT5 is the same.

 
Dmitri Custurov #:

It doesn't run on MT5. It requires a different dll ? I see the size in the archives for both MT4 and MT5 is the same.

Use 64 bit DLL
 

@Eugeniy Lugovoy

I can't understand what he wants? I'm not good with database plugins.

Connection failed! Error: Authentication plugin 'caching_sha2_password' cannot be loaded: Не найден указанный модуль.

MT4, MySQL 8.0.32 (localhost)

What to do?

Eugeniy Lugovoy
Eugeniy Lugovoy
  • 2019.12.30
  • www.mql5.com
Профиль трейдера
 
Viktor Vasilyuk #:

@Eugeniy Lugovoy

I can't understand what he wants? I'm not good with DB plugins

MT4, MySQL 8.0.32 (localhost)

What to do?

This error is generated by MySQL, see https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded for the solution.
 
Eugeniy Lugovoy #:
This error is generated by MySQL, see https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded for the solution.
Thanks. The recommendation worked.
 
Eugeniy Lugovoy #:

Version 3.0 includes work with UTF-8

I get question marks instead of Cyrillic characters.

part DDL table:

ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

column type -> text (not varchar)

MT4 dll:

MQLMySQL v3.0 x32 Copyright © 2014-2019, FxCodex Laboratory
 
Viktor Vasilyuk #:

It's returning question marks instead of Cyrillic.

part DDL table:

column type -> text (not varchar)

MT4 dll:

UTF8 goes two-byte, classic so to speak, you are using four-byte when defining a table. This is most likely the problem. Text type at MySQL driver level is not different from varchar.
 
Viktor Vasilyuk #:

It's returning question marks instead of Cyrillic.

part DDL table:

column type -> text (not varchar)

MT4 dll:

But I will check it when I get a chance
 
Eugeniy Lugovoy #:
UTF8 goes two-byte, classic so to speak, you use four-byte when defining a table. This is most likely the problem. Text type at the MySQL driver level is not different from varchar.

thanks for the clarification. I can't know everything, that's why I'm asking.

The solution for myself found here.

P.S: Checked for SELECT - it works

Convert output of MySQL query to utf8
Convert output of MySQL query to utf8
  • 2013.04.17
  • orezvani orezvani 3,515 8 8 gold badges 43 43 silver badges 55 55 bronze badges
  • stackoverflow.com
but I want the mysql to return the in utf8 encoding. Is it any function in mysql to do such task? What is that?