Hi folks,
I'm coding under Windows because of my job requires it. I have for many years been using Active Perl, but it does not seam to be running anymore or maintained. By the way, I don't understand anything on their website (they don't speak about Perl). Everything was easy with Active Perl and PPM. But, Active Perl seamed obsolete and I moved to Strawberry Perl. And the things are not so easy.
Now, I have some scripts which used the DBI interface and the DBD::Mysql driver to read/write in a database managed by the MAMP software which was running very well on Windows for years. Now, after installing Strawberry Perl, some modules are not installed anymore. The easiest way I found to (re)install them is to use the "cpanm" utility. It is usually running smooth and pretty fast.
But the things were going wrong when trying to install and compile the DBD::Mysql module (driver) I need it for my scripts, in order to access the MySQL DBs. Here are the issues I had to deal with :
- The compilation failed because the Makefile couldn't get the Mysql configuration by calling the "mysql_config.pl" script provided by MAMP. I had to add the "bin" directory in the %PATH% system variable under Windows.
- I had to specify to Makefile.pl the "--mysql_config=mysql_config.pl" option to help to find the script, but the script does not seam to work well, it does not properly return values that you may call, for example by doing : "mysql_config.pl --version". It always return the %PATH% value.
- I made a specific "mysql_config.pl" script that I put in the build directory for Cpanm (C:\Users\me\.cpanm\work\workidxxx\Module-Name), very simple, that works when you call it with all available options, such as "--version". I have added some default values normally called by Makefile.pl, however without certainty of the right values to use.
- Then the compilation was refused because my MySQL version (5.47) was lesser than the minimum required by this version of the driver. I was advised to install the version 8 of MySQL, but 5.7 is considered as more stable. MAMP does not provide a version with MySQL 8. WAMP, yes, but I prefer MAMP.
- Alternatively, I have installed a package of MariaDB for Windows, but the compilation/installation of the DBD::MariaDB, based on DBD::Mysql, failed the same way. I have adapted the modifications I made for DBD::Mysql for MariaDB, so now, I'm focusing on installing/compiling the MariaDB driver, which seams also to be compatible with MySQL.
I'm at the point where, after running the Makefile.pl file with these options : "perl Makefile.pl --cflags="-IC:\Program Files\MariaDB 11.8\include\mysql" --libs="-LC:\Program Files\MariaDB 11.8\lib -lmysqlclient" --testdb=test --testuser=perl --mariadb_config=.\mariadb_config.pl", it cannot find the "mariadb_config.pl" which is located in the current directory :
"Specified mysql configuration script '.\mariadb_config.pl' doesn't exist.
Please check path/permissions."
I'm stuck, now, and I can't use all my scripts connecting to the MySQL/MariaDB database now.
If someone is good at this configuration and can help, I would be grateful.
Thanks.
Gosseyn alias Alan.
PS : I have managed to install the all stuff under darwin (MacOS X) with homebrew. Everything was running fine until I get to install DBD::MariaDB with Cpanm. It's a curse...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.