S_Shrum has asked for the wisdom of the Perl Monks concerning the following question:

Okay, I've programmed everything I ever needed myself and I'm tired of doing it that way. I yield to the USE clause!

I'm new to the whole PPM (Perl Package Manager) and binaries thingy but sorta figured the PPM thing out. My issue is with these "binaries". Specifically the MySQL one. Now before you flame me and tell me to go to mysql.com, hear me out.

I d/l'ed the mysql binary and openned the .gz and then the .tar file in that. What I see looks like it should be dumped in the Perl/site/lib folder but I see folders (in the archive) that I already have. For fear of overwritting a exisiting file, what is the typical process for installing binaries? Is there EVEN a typical installation process for binaries on Windows-based OSs? (My assumption is 'I don't know')

With that out of the way, anyone with experience installing the MySql binary, please help me out. Let me know the installation pitfalls if any (...what am I saying; there are always pitfalls). ;-p

======================
Sean Shrum
http://www.shrum.net

Replies are listed 'Best First'.
Re: New to the whole BINARIES-thingy
by MZSanford (Curate) on Feb 07, 2002 at 08:49 UTC
    If you are on windows, and are using ActiveState perl, and have ppm, then this is much easier. you simply use the command :
    C:\WINDOWS>ppm install DBD::MySql
    Now, DBD::MySql does require DBI, so you may also have to do ppm install DBI first. I did this on my pc, with no prior mysql installs, and it looked like this :
    C:\WINDOWS>ppm install DBD::MySql Installing package 'DBD-MySql'... Bytes transferred: 126147 Installing C:\Perl\site\lib\auto\DBD\mysql\mysql.bs Installing C:\Perl\site\lib\auto\DBD\mysql\mysql.dll Installing C:\Perl\site\lib\auto\DBD\mysql\mysql.exp Installing C:\Perl\site\lib\auto\DBD\mysql\mysql.lib Installing C:\Perl\html\site\lib\Mysql.html Installing C:\Perl\html\site\lib\Bundle\DBD\mysql.html Installing C:\Perl\html\site\lib\DBD\mysql.html Installing C:\Perl\site\lib\Mysql.pm Installing C:\Perl\site\lib\Mysql\Statement.pm Installing C:\Perl\site\lib\DBD\mysql.pm Installing C:\Perl\site\lib\Bundle\DBD\mysql.pm Installing C:\Perl\bin\dbimon Installing C:\Perl\bin\dbimon.bat Writing C:\Perl\site\lib\auto\DBD\Mysql\.packlist C:\WINDOWS>
    And, Ta-Da, from the next snippet you can see the library loads fine :
    C:\WINDOWS>perl -MDBD::MySql -e 1 C:\WINDOWS>

    from the frivolous to the serious

      That's what I thought...but here's what I get:

      PPM - Programmer's Package Manager version 3.0 beta 2. Copyright (c) 2001 ActiveState SRL. All Rights Reserved. Entering interactive shell. Using Term::ReadLine::Stub as readline lib +rary. Profile tracking is not enabled. If you save and restore profiles manu +ally, your profile may be out of sync with your computer. See 'help profile' + for more information. Type 'help' to get started. ppm> install DBD::MySql Error: Package 'DBD::MySql' not found. Please 'search' for it first. ppm>

      Any ideas?

      ======================
      Sean Shrum
      http://www.shrum.net

        The module name is DBD::mysql, lowercase 'mysql'.

        After Compline,
        Zaxo


        Perhaps you are behind a firewall.

        If so, have a look here for information about how to work with that.

        --
        John.


        Okay. My second guess. ;-)

        You should try install DBD-MySql, with - instead of ::. It may need to be lowercase as well.

        --
        John.

        Try install DBD-mysql

        I believe that the double colon is changed for a dash to allow the package to be a valid filespec under win32 etc.

Re: New to the whole BINARIES-thingy
by S_Shrum (Pilgrim) on Feb 07, 2002 at 11:16 UTC

    Okay, here's the skinny.

    DBD::Mysql is not listed in the repository. Why? One thought is that my build of ActiveState's Perl (630) is not compatible with the 62X series. As a result, there is a seperate 63x repository. This would explain why some people (running 62x) see the file and others (me running 630) do not. If this is true or not is to be debated.

    Maybe someone knows for sure...these are our ASSuptions. ;-p

    Solution: download the Mysql ppd file from ActiveState's website directly, unzip to a temp folder, launch a command prompt window, cd to the temp folder and type in: ppm install dbd-mysql.ppd Thanx to jmcnamara and tinman for there tedious use of the CB.

    ======================
    Sean Shrum
    http://www.shrum.net

Re: New to the whole BINARIES-thingy
by beebware (Pilgrim) on Feb 07, 2002 at 20:54 UTC

    If you read the MySQL manual on Activestate Perl, you see that to install the MySQL DBD, you'll need the following commands:

    ppm install DBI install ftp://ftp.de.uu.net/pub/CPAN/authors/id/JWIED/DBD-mysql-1.2212 +.x86.ppd

    A handy program that I know, is PHPTriad from PHPGeek.com which installs PHP, Apache, MySQL, Perl and PHPMyAdmin for you on a Windows box. No need to bother with PPM or CPAN to install the modules you need to get Perl and MySQL and Apache working nicely together.

    Finally, I would re-run the Activestate Perl installer and remove PPM3 which you seem to be running. It is still in beta and, therefore, shouldn't be used by 'novices'. Standard 'PPM' (aka 'PPM2') works nicely and I've had no problems with it (although I've only tried PPM3 around 4 times myself).

Re: New to the whole BINARIES-thingy
by trs80 (Priest) on Feb 08, 2002 at 07:45 UTC
    If you are using ppm3 (it looks like you are from your post) setting of the repository via the command line is much eaiser then the "old" ppm.

    rep - this will print all the repositories available, which should contain both of the activestate ones by default.

    rep set n - this will change to the rep that is n in the list you got from rep alone.

    rep add "Name of Rep" URL - that will add new repositories to the rep list.

    The documentation that comes with the latest copy of ActiveState Perl includes the PPM documentation in HTML format if you opted to install it. It covers all of this as well.
    You can get the latest PPM (currently 3.0 Beta 3) at ActiveState , if you have the latest version of Perl from ActiveState you already have the latest version, you will need to run ppm3 vs. ppm to use the 3.0 beta 3 version.