in reply to MySQL/MariaDB DBD install problem

I have tried to install the module using CPAN and I get the message that the installer cannot find "mysql.h".

Simplest way to ensure that the unlocatable "mysql.h: is found is to:
set CPATH=C:\Ampss\mysql\include;%CPATH%
prior to running cpan.
You might also need to set the LIBRARY_PATH environment variable to locate the mysql library (.a) files.

I'm assuming this mysql library that you have is compatible with strawberry's gcc-13.2.0 compiler.
You might also get good help by filing an issue about this at https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: MySQL/MariaDB DBD install problem
by ABayko (Novice) on Sep 23, 2024 at 22:03 UTC

    Thank you for your response. This did not fix the problem. I have since migrated to SQLite (which was included with strawberry perl). I am not doing anything really stressful (no multiple users or access over a network).<\P>

        I see there was a message there from Mar 6 where they noted the packages were not installed by default.

      To install DBD-Maria-1.22 onto latest StrawberryPerl-5.40.0, I copied over the libmysql stuff from StrawberryPerl-5.38.2 (portable edition).
      That is:
      1) copy mysql_config.bat from SP-5.38.2/c/bin to SP-5.40.0/c/bin;
      2) copy libmysql__.dll from SP-5.38.2/c/bin to SP-5.40.0/c/bin;
      3) copy libmysql.a from SP-5.38.2/c/lib to SP-5.40.0/c/lib;
      4) copy the mysql50716 folder from SP-5.38.2/c/include to SP-5.40.0/c/include;

      Then I built and installed the module manually from downloaded source (by running perl Makefile.PL, then gmake test, then gmake install).
      You could also install version 1.22 using either the cpan or cpanm utilities - but you have to direct it to grab the 1.22 source.

      Version 1.23 won't build against that library because the symbol __imp___pioinfo can't be resolved.
      If you can substitute in a (presumably more recent) mysql library that resolves that symbol, then you should be able to install version 1.23.

      Cheers,
      Rob
        Thank you, Rob! Your instructions assisted me in installing the most recent version of the DBD::mysql 4 branch driver. This will help buy us perl on windows developers a bit more time...