Hi Umdurman,

I don't have much that you'll want to hear, sorry ...

Personally I gave up on MacPorts for Perl and for MySQL because I was running into lots of problems like the one you described. Can't recall the details but I know I got so sick of it I switched back to installing MySQL using the native package installer available from MySQL (I most recently used mysql-5.6.26-osx10.9-x86_64.dmg ... latest docs here ).

I then made sure to install my own version of Perl using Perlbrew, leaving the Mac OSX system Perl completely out of it.

This allows me to use CPAN via cpanm and just install Perl modules as normal, including the DBI and DBD::mysql.

One thing I remember I had to do was symlink this dynamic library:

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmy +sqlclient.18.dylib
(and if you are on El Capitan or newer you'll have to disable SIP in order to create the symlink.)

It may be just me, but for > 20 years I've had a much easier time using CPAN than with any of the pre-packaged systems, this is going back to FreeBSD (which of course OS X is based on). I do use MacPorts for certain other packages, because it sure does work well in most cases, but I've just always run into conflicts when it comes to MySQL/Perl/DBD::mysql.

There are other packagers for Mac, including Homebrew, which is very easy to use, and MAMP, which you might like, because it installs Apache with mod_perl as well as MySQL and Perl.

I no longer use Apache/mod_perl, and to be sure I remember that installing that combo manually was sometimes tricky, so I don't know what I'd do if I needed it, but for a long time what has worked best for me on OS X is:

Hope this helps (a little) !

The way forward always starts with a minimal test.

In reply to Re: Mac ports DBD not working by 1nickt
in thread Mac ports DBD not working by Umdurman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.