Recent

Author Topic: [SOLVED] Use Mariabd xampp PHP7  (Read 2301 times)

WimVan

  • Jr. Member
  • **
  • Posts: 76
[SOLVED] Use Mariabd xampp PHP7
« on: November 29, 2018, 09:53:09 am »
I spend now more than a week to connect Lazarus to Mariadb.
1) I use Win10
2) Xampp is installed using  xampp-win32-7.2.11-0-VC15-installer
This means that PHP7 is no longer working with pure mysql-functions.  Mysqllite is now used....
3) All databases runs now under mariadb and the server-program still uses mysql.
Mysql is installed and runs as a service on the PC.

When I try to connect lazarus to a database, I receives the message that libmysql.dll is not found ...
Nowhere I can find that dll on the server, even not under the xampp (sub)folders....
I then downloaded the mysql-installer from Sun and run it.  Full install.  I removed the mysql-service in xampp so I could start it up with the SUN-Mysql.
I found a libmysql.dll and copied it to the lazarus-folder as mentioned in a lot of topics about this problem ...

Still nothing is working ...
I changed the systempath too ...  Nothing helps ...

Someone an idea ?

If I had knew it ....  5 weeks lost in analyses, making workflows, searching for the needed components and finally the botlleneck is retrieving data from a database.  I even can't start developping because I need data (read access to the BD for columnnames, records ...)

Some one an idea how to solve this problem and making Lazarus-Mysql working  ?

Thanks

« Last Edit: November 30, 2018, 10:49:39 am by WimVan »

taazz

  • Hero Member
  • *****
  • Posts: 5363
Re: Use Mariabd xampp PHP7
« Reply #1 on: November 29, 2018, 10:31:40 am »
I spend now more than a week to connect Lazarus to Mariadb.
1) I use Win10
2) Xampp is installed using  xampp-win32-7.2.11-0-VC15-installer
This means that PHP7 is no longer working with pure mysql-functions.  Mysqllite is now used....
3) All databases runs now under mariadb and the server-program still uses mysql.
Mysql is installed and runs as a service on the PC.

When I try to connect lazarus to a database, I receives the message that libmysql.dll is not found ...
Nowhere I can find that dll on the server, even not under the xampp (sub)folders....
I then downloaded the mysql-installer from Sun and run it.  Full install.  I removed the mysql-service in xampp so I could start it up with the SUN-Mysql.
I found a libmysql.dll and copied it to the lazarus-folder as mentioned in a lot of topics about this problem ...

Still nothing is working ...
I changed the systempath too ...  Nothing helps ...

Someone an idea ?

If I had knew it ....  5 weeks lost in analyses, making workflows, searching for the needed components and finally the botlleneck is retrieving data from a database.  I even can't start developping because I need data (read access to the BD for columnnames, records ...)

Some one an idea how to solve this problem and making Lazarus-Mysql working  ?

Thanks
install the 32bit mysql connector from the mysql community installer as well, Then copy the dll from the connector in the directory where lazarus.exe is and see if that solves the problem from my experience this is a bitness problem.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

WimVan

  • Jr. Member
  • **
  • Posts: 76
Re: Use Mariabd xampp PHP7
« Reply #2 on: November 29, 2018, 12:59:26 pm »
Thanks, but I tried and a 32 and a 64-version.  Nothing helped.

taazz

  • Hero Member
  • *****
  • Posts: 5363
Re: Use Mariabd xampp PHP7
« Reply #3 on: November 29, 2018, 03:03:04 pm »
Thanks, but I tried and a 32 and a 64-version.  Nothing helped.
please provide
1) lazarus and fpc version.
2) detail steps for testing the connection
3) The exact fail message.

Keep in mind that placing the the dll in the lazarus.exe directory only allows you to connect to the server from inside the IDE not from your application.

Thank you.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

WimVan

  • Jr. Member
  • **
  • Posts: 76
Re: Use Mariabd xampp PHP7
« Reply #4 on: November 29, 2018, 09:15:26 pm »
I added a picture with all info asked for:

Lazarus: 1.8.4  Date: 2018-05-19
FPC Version: 3.0.4

Win10 54bit

When adding a component (MySQL57Connection) to connect to MySQL and checking the connect-checkbox, an error-message appears: Can not load default MYSQL librry ("libmysql.dll" or "libmysql.dll"). Check your installation.

DLL is put in map where lazarus.exe resides.  System-veriable-paht contains also path to lazarus-map.

Added the setup of xampp (PHP, Apache and Mysql)

Any way Thanks all of you to the time spend to this problem.

Wim Vanmaele

mangakissa

  • Hero Member
  • *****
  • Posts: 961
Re: Use Mariabd xampp PHP7
« Reply #5 on: November 30, 2018, 08:34:16 am »
The library libmysql.dll has problems with mariadb, even the source is almost the same.
Install mariadb on windows. Take this libmysql.dll fom the installation. Put this in your program files of lazarus or system32 of windows or in your application path. Then use Mysq56Connection to connect to server. If you can connect you local databaseserver, de remote server will be available to.

SQLdb depends on the right library.
Lazarus 1.84 (32b) / FPC 3.0.4
Windows 10

WimVan

  • Jr. Member
  • **
  • Posts: 76
Re: [SOLVED] Use Mariabd xampp PHP7
« Reply #6 on: November 30, 2018, 11:03:22 am »
It took me some time and tests and finally ..

1) Indeed, download the Mariadb-installationkit from: https://downloads.mariadb.org/
Version: mariadb-10.1.37-winx64.zip
Be aware: Version: mariadb-10.3.11-winx64.zip  DOES  NOT  contain 'libmysql.dll'

2) Unzip and search for 'libmysql.dll'.  When found, copy it to the \lazarus-map ...

Now connection is succesfull ....

Thanks for the help.  Is it possible to add the concerned dll to the installationkit of Lazarus, eventually with a check-box in the install-gui ?  It would help very much people.

HeavyUser

  • Sr. Member
  • ****
  • Posts: 269
Re: [SOLVED] Use Mariabd xampp PHP7
« Reply #7 on: November 30, 2018, 12:45:01 pm »
It took me some time and tests and finally ..

1) Indeed, download the Mariadb-installationkit from: https://downloads.mariadb.org/
Version: mariadb-10.1.37-winx64.zip
Be aware: Version: mariadb-10.3.11-winx64.zip  DOES  NOT  contain 'libmysql.dll'

2) Unzip and search for 'libmysql.dll'.  When found, copy it to the \lazarus-map ...

Now connection is succesfull ....

Thanks for the help.  Is it possible to add the concerned dll to the installationkit of Lazarus, eventually with a check-box in the install-gui ?  It would help very much people.
have you tried to rename the mariadb client dll from the latest installation to whatever dll name the mysqlconnection requires? I think it works but not sure.

mangakissa

  • Hero Member
  • *****
  • Posts: 961
Re: [SOLVED] Use Mariabd xampp PHP7
« Reply #8 on: November 30, 2018, 01:24:37 pm »
Quote
Thanks for the help.  Is it possible to add the concerned dll to the installationkit of Lazarus, eventually with a check-box in the install-gui
That's not possible. In the world of databases libraries are changing constantly.
Lazarus 1.84 (32b) / FPC 3.0.4
Windows 10