Recent

Author Topic: [SOLVED] Error to connect a MySQL 5.1  (Read 2771 times)

ezikoh

  • New Member
  • *
  • Posts: 29
[SOLVED] Error to connect a MySQL 5.1
« on: April 12, 2016, 05:11:24 pm »
Hello

I've written a console program connecting to  Mysql server 5.1  and runs without errors connection.

But now, I'm doing the same program using GUI and I get the following error when trying to connect to mysql server 5.1.

TMySQL51Connection can not work with the installed MySQL client version: Expected (5.1), got (6.1.6)

In both project the file libmysql.dll is in the project folder, and do not understand how indicate that use mysql version 5.1 in the GUI program

Thank you.



« Last Edit: April 18, 2016, 06:01:30 pm by ezikoh »

LacaK

  • Hero Member
  • *****
  • Posts: 577
Re: Error to connect a MySQL 5.1
« Reply #1 on: April 12, 2016, 08:20:56 pm »
IMO it can not play a role if you run compiled exe (console or GUI)
Once you use TMySQL51Connection behavior is same.

Does error appears when you run compiled exe or when you work in Lazarus IDE ?
Are you sure that, libmysql.dll are same in both cases ?

ezikoh

  • New Member
  • *
  • Posts: 29
Re: Error to connect a MySQL 5.1
« Reply #2 on: April 12, 2016, 08:30:47 pm »
Hello, when I compiled exe does not appears errors, only in runtime.

The file libmysql.dll is the same in both cases.

To correct error is posible use the class TSQLDBLibraryLoader to load libmysql.dll before init  TMySQL51Connection?.

Thank you.

LacaK

  • Hero Member
  • *****
  • Posts: 577
Re: Error to connect a MySQL 5.1
« Reply #3 on: April 13, 2016, 09:48:12 pm »
Yes you can.

Or if you use trunk version of FPC you can specify property of TMySQLConnection :
 SkipLibraryVersionCheck := True;

ezikoh

  • New Member
  • *
  • Posts: 29
Re: Error to connect a MySQL 5.1
« Reply #4 on: April 18, 2016, 04:05:20 pm »
Thank you for your help.