Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Mac ports DBD not working

by Umdurman (Acolyte)
on Feb 14, 2016 at 12:08 UTC ( [id://1155202]=perlquestion: print w/replies, xml ) Need Help??

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

Hey guys, I havent been here for a while but now I need some wisdom from you all;-) I am setting up a new server under Mac OS X 10.11.3 (15D21) I need the following tools to be installed on this server:

Macports
perl5.8
mod_perl2
p5-cgi
p5-libwww-perl
p5-perlmagick
ImageMagick
p5-html-parser
p5-mail-sendmail


mysql5
mysql5-server
p5-dbi
p5-dbd-mysql ***


Now here is what is happening; Everything goes well up to installing the last module "p5-dbd-mysql". Before installing this module perl is running with all its modules and Mysql is up and running and I can access the databases with Navicat. If I install the last module "p5-dbd-mysql" I can also read and write the databases from my websites. All looks good... But When I restart the server my mysql will not load anymore with the message "ERROR! The server quit without updating PID file".

I need to uninstall all mysql modules and reinstall them to get the configuration working again. I also tried changing the installation order of the modules without success. I understand that the module "p5-dbd-mysql" is installing its own mysql and I think this is causing a clash. I am looking for a dbd module that does not install mysql but the core dbd.

I am really stuck here and need the server up and running soon.

Thank you in advance,

Ton

Replies are listed 'Best First'.
Re: Mac ports DBD not working
by 1nickt (Canon) on Feb 14, 2016 at 15:09 UTC

    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:

    • the native package installer for MySQL
    • perlbrew for Perl
    • CPAN for Perl modules
    • MacPorts for libraries like ImageMagick, Cairo, openssl, libxml2 etc.

    Hope this helps (a little) !

    The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1155202]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-20 03:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found