Page 1 of 1

zeoslib mysql 4.0 protocol

Posted: 01.07.2019, 02:51
by shoulder
Hello it is possible to add to the versions from 6.6 or 7.2 the protocol of mysql pre 4.0. I can modify some.ini within the installation. I would need this protocol to connect to a mysql 5.6 but they are using an old_password. Thank you.

Re: zeoslib mysql 4.0 protocol

Posted: 01.07.2019, 07:54
by marsupilami
Hello and welcome to the forums,

usually any Zeos mysql protocol should work with MySQL 5.6 or any previous version. What error message do you get?

Best regards,

Jan

Re: zeoslib mysql 4.0 protocol

Posted: 01.07.2019, 13:53
by shoulder
Hello, first, thank you for accepting me. The problem that I have, where I work still uses old_password mysql 4.0 in the BD mysql 5.6. They connect with a 2004 Zeos version, It works perfect. But the version of zeos doesn't accept me to work with Processes, functions and is slow. When installing on Delphi 7 versions of zeos 6.6 ... 7.2 I don't see the mysql 4.0 protocol and it does not let me connect to the database because I get a message that there is an old_password in the BD. When I install the later versions I see on the protocol mysql 4.1, mysql 5.0 ..... and later. Is there any .ini to be able to select mysql 4.0 protocol?.
Thanks.

Re: zeoslib mysql 4.0 protocol

Posted: 02.07.2019, 07:57
by marsupilami
Hello,

it seems old_password has to do with password management in MySQL. See here. So some questions:
  • Which version of MySQL Server do you use? MySQL 5.6?
  • Which version of libmysqlclient or MySQL Connector/C do you use? Is it the same as the server version?
In Zeos just choose "mysql" as the protocol. Protocols with version numbers will be removed in the future because they all behave the same way. So mysql is the same as mysql-4.1 and mysql-4.1 is the same as mysql-5. Just use "mysql" and you will be good from a Zeos side. Zeos does not choose if old_password gets used or not - this is done by libmysqlclient and the server.

Best regards,

Jan

Re: zeoslib mysql 4.0 protocol

Posted: 02.07.2019, 15:08
by shoulder
Hi, the mysql version of BD is 5.6.44. With previous versions of zeoslib of 2004 I connect without problem to mysql 5.6 with protocol mysql 4.0 in Zeoslib. Later versions of zeoslib in protocol have mysql, mysql4.1 mysql 5.0. Even though choosing mysql as a protocol doesn't connect me. can I add the protocol mysql 4.0 ?. Because with the old version of mysql it is very slow and I can't use procedures and functions. For now I can't change Old_passwords doesn't depend on me... But when I schedule I find this problem.
Although I use a zeoslib version of 2004, zeoslib is an excellent tool.

Thanks.

Re: zeoslib mysql 4.0 protocol

Posted: 02.07.2019, 17:48
by marsupilami
Hello,

please try this:

Code: Select all

MyZeosConnection.Properties.Add('MYSQL_SECURE_AUTH=false');
// maybe some more code here
MyZeosConnection.Connect;
If this doesn't work, please supply the complete MySQL error message. Or maybe a screen shot of the error message.

Another option might be to try the MariDB Connector / C: https://downloads.mariadb.org/connector-c/3.1.2/. Remember to set the correct library location in Zeos then.

Best regards,

Jan

Re: zeoslib mysql 4.0 protocol

Posted: 02.07.2019, 23:42
by shoulder
Thank you!!! I could connect, genius !!!, the only thing now when I compile the program comes a message tzquery property requestlive not found ..... I made a view text but I can't find where to cancel it from the tquery.

Thankss.

Re: zeoslib mysql 4.0 protocol

Posted: 03.07.2019, 08:41
by marsupilami
Hello,

it's good to hear, it works :)

Regarding requestlive: RequestLive was a property on Zeos 5 datasets. You need to remove it from code and from your dfm files. To remove it from code: Use the Grep Search functionality of GExperts. To remove it from DFM files just open and save all your forms and tell Delphi to ignore the unknown property RequestLive.

RequestLive was more or less replaced by the ReadOnly property, which is the counterpart of RequestLive: So whenever RequestLive is true, Readonly needs to be false. And whenever RequestLive is false ReadOnly needs to be true.

Best regards,

Jan

Re: zeoslib mysql 4.0 protocol

Posted: 03.07.2019, 20:55
by shoulder
thanks works!!!!!!!! Could it be that zeoslib 7.2 is a bit slower in some cases? when I issue listing it takes to begin.
Thanks for all.

Re: zeoslib mysql 4.0 protocol

Posted: 04.07.2019, 08:29
by marsupilami
Hello,

Zeos 7.2 could be slower than older Zeos versions in some reagrds. But we also introduced a lot of bug fixes and performance improvements. Cold you show me the code that is slower now?

Best regards,

Jan

Re: zeoslib mysql 4.0 protocol

Posted: 04.07.2019, 15:12
by shoulder
Hello, zeoslib begins to be slower when there are several zquery within a while, this is an example. Greetings and thanks.

Code: Select all



zquery3.Close;
zquery3.SQL.Clear;
zquery3.sql.add ('select  …from empresa where codigo = :codigo 'order by  codigo'); //5
zquery3.Params.ParamByName('codigo').value :=   dblookupcombobox3..keyvalue;
zquery3.Open;
 while not zquery3.EOF do
   begin
……
  zquery16.Close;
     zquery16.SQL.Clear;
     zquery16.Close;
     zquery16.SQL.Clear;
     zquery16.sql.add ('select  sector------'); //5
      zquery16.Params.ParamByName('tipo').value := zquery3.Fields[0].AsString;;
       zquery16.Open;
    if not zquery16.EOF then
     begin
     ….
End;

    zquery16.Close;
     zquery16.SQL.Clear;
     zquery16.Close;
     zquery16.SQL.Clear;
     zquery16.sql.add ('select  codigo------'); //5
      zquery16.Params.ParamByName('tipo').value := zquery3.Fields[0].AsString;;
       zquery16.Open;
    if not zquery16.EOF then
     begin
     ….
     End;
    zquery16.Close;
     zquery16.SQL.Clear;
     zquery16.Close;
     zquery16.SQL.Clear;
     zquery16.sql.add ('select  numero-----'); //5
      zquery16.Params.ParamByName('tipo').value := zquery3.Fields[0].AsString;;
       zquery16.Open;
    if not zquery16.EOF then
     begin
     ….
     End;
i := I +1;
     zquery3.Next;
   end;

zquery3.Close;



Re: zeoslib mysql 4.0 protocol

Posted: 08.07.2019, 08:59
by marsupilami
Hello,

I am not sure if result sets are cached in that scenario. Also sometimes bug fixing and new features introduce a performance penalty. You could try to see what happens using a profiler.

Also you might want to check wether the problem is better solved by a stored procedure that runs directly on the server and only gets called by Zeos. This way you will save a lot of network and API roundtrips.

Best regards,

Jan

Re: zeoslib mysql 4.0 protocol

Posted: 11.07.2019, 15:53
by shoulder
First thank you, the truth is there is a huge difference between the Zeoslib version of 2005 and the 7.2. The processes work and I realized that with the 2005 version there were blockages of tables and it was all slower. Now, when you open the windows of the program, everything is faster.