Howto install DBD-mysql on Mac OS X - Solution

Discussion in 'Perl Misc' started by Martin Kissner, May 10, 2005.

  1. Hello together,

    this time I am not going txpo post a Question but a solution to a - as
    far as I know common - problem.

    Installation of DBD-mysql has been a problem on Mac OS X 10.3 and still
    is on Mac OS X 10.4.

    As far as I have experienced at least one problem is that mysql_config
    does not provide correct settings for cflags and libs directories, which
    actually is an error of mysql and not of Perl.
    It can be solved by editing "/usr/local/mysql/bin/mysql_config" and
    changing the following lines:

    pkglibdir='/usr/local/mysql/lib/mysql'
    to
    pkglibdir='/usr/local/mysql/lib/'
    and
    pkgincludedir='/usr/local/mysql/include/mysql'
    to
    pkgincludedir='/usr/local/mysql/include/'

    It is also possible to leave mysql_config alone and to call "perl
    Makefile.PL" as follows (all in one line and with a space before the
    second and thid line), but I prefere the first method:

    perl Makefile.PL --cflags="-I/usr/local/mysql/include/
    -fno-omit-frame-pointer" --libs="-L/usr/local/mysql/lib/ -lmysqlclient
    -lz -lm"

    I have tested both methods on Mac OS X 10.4 and hope that this will be
    useful to others.

    Best regards
    Martin

    --
    perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
    [29,77,98,111,105,29],[100,93,95,103,97,110]];
    for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'
    Martin Kissner, May 10, 2005
    #1
    1. Advertising

  2. Martin Kissner

    Guest

    Martin Kissner wrote:
    > Hello together,
    >
    > this time I am not going txpo post a Question but a solution to a -

    as
    > far as I know common - problem.
    >
    > Installation of DBD-mysql has been a problem on Mac OS X 10.3 and

    still
    > is on Mac OS X 10.4.
    >
    > As far as I have experienced at least one problem is that

    mysql_config
    > does not provide correct settings for cflags and libs directories,

    which
    > actually is an error of mysql and not of Perl.
    > It can be solved by editing "/usr/local/mysql/bin/mysql_config" and
    > changing the following lines:
    >
    > pkglibdir='/usr/local/mysql/lib/mysql'
    > to
    > pkglibdir='/usr/local/mysql/lib/'
    > and
    > pkgincludedir='/usr/local/mysql/include/mysql'
    > to
    > pkgincludedir='/usr/local/mysql/include/'
    >
    > It is also possible to leave mysql_config alone and to call "perl
    > Makefile.PL" as follows (all in one line and with a space before the
    > second and thid line), but I prefere the first method:
    >
    > perl Makefile.PL --cflags="-I/usr/local/mysql/include/
    > -fno-omit-frame-pointer" --libs="-L/usr/local/mysql/lib/

    -lmysqlclient
    > -lz -lm"
    >
    > I have tested both methods on Mac OS X 10.4 and hope that this will

    be
    > useful to others.
    >
    > Best regards
    > Martin
    >
    > --
    > perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
    > [29,77,98,111,105,29],[100,93,95,103,97,110]];
    > for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'


    I had no problem with installing DBD-mysql. What version of MySQL did
    you use? I put the current autoinstall for OS X in my system (10.3 and
    now 10.4) and had no problem. Maybe they fixed it?
    , May 10, 2005
    #2
    1. Advertising

  3. wrote :

    > I had no problem with installing DBD-mysql. What version of MySQL did
    > you use? I put the current autoinstall for OS X in my system (10.3 and
    > now 10.4) and had no problem. Maybe they fixed it?


    MySQL version 4.1.11 installed with the package installer by
    http://dev.mysql.com/downloads/mysql/4.1.html (Standard) on
    Mac OS X 10.4

    I had the same trouble with 4.0.23 on Mac OS X 10.3.

    Surprisingly I didn't have the problem on my iBook but only on my G4
    Sawtooth.

    I'd ask you a favour:
    Could you please post the output of
    mysql_config
    in Terminal?

    Thanks in advance and
    Best regards
    Martin

    --
    perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
    [29,77,98,111,105,29],[100,93,95,103,97,110]];
    for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'
    Martin Kissner, May 10, 2005
    #3
  4. wrote :

    > I had no problem with installing DBD-mysql. What version of MySQL did
    > you use? I put the current autoinstall for OS X in my system (10.3 and
    > now 10.4) and had no problem. Maybe they fixed it?


    MySQL version 4.1.11 installed with the package installer by
    http://dev.mysql.com/downloads/mysql/4.1.html (Standard) on
    Mac OS X 10.4

    I had the same trouble with 4.0.23 on Mac OS X 10.3.

    Surprisingly I didn't have the problem on my iBook but only on my G4
    Sawtooth (at least under 10.3).

    I'd ask you a favour:
    Could you please post the output of
    mysql_config
    in Terminal?

    Thanks in advance and
    Best regards
    Martin

    --
    perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
    [29,77,98,111,105,29],[100,93,95,103,97,110]];
    for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'
    Martin Kissner, May 10, 2005
    #4
  5. Martin Kissner

    Guest

    Martin Kissner wrote:
    > wrote :
    >
    > > I had no problem with installing DBD-mysql. What version of MySQL

    did
    > > you use? I put the current autoinstall for OS X in my system (10.3

    and
    > > now 10.4) and had no problem. Maybe they fixed it?

    >
    > MySQL version 4.1.11 installed with the package installer by
    > http://dev.mysql.com/downloads/mysql/4.1.html (Standard) on
    > Mac OS X 10.4
    >
    > I had the same trouble with 4.0.23 on Mac OS X 10.3.
    >
    > Surprisingly I didn't have the problem on my iBook but only on my G4
    > Sawtooth (at least under 10.3).
    >
    > I'd ask you a favour:
    > Could you please post the output of
    > mysql_config
    > in Terminal?


    Usage: ./mysql_config [OPTIONS]
    Options:
    --cflags [-I/usr/local/mysql/include
    -fno-omit-frame-pointer]
    --include [-I/usr/local/mysql/include]
    --libs [-L/usr/local/mysql/lib -lmysqlclient -lz -lm]
    --libs_r [-L/usr/local/mysql/lib -lmysqlclient_r -lz
    -lm]
    --socket [/tmp/mysql.sock]
    --port [3306]
    --version [4.1.10a]
    --libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lm]
    , May 10, 2005
    #5
  6. wrote :
    >
    > Martin Kissner wrote:
    >>
    >> I'd ask you a favour:
    >> Could you please post the output of
    >> mysql_config
    >> in Terminal?

    >
    > Usage: ./mysql_config [OPTIONS]
    > Options:
    > --cflags [-I/usr/local/mysql/include
    > -fno-omit-frame-pointer]
    > --include [-I/usr/local/mysql/include]
    > --libs [-L/usr/local/mysql/lib -lmysqlclient -lz -lm]
    > --libs_r [-L/usr/local/mysql/lib -lmysqlclient_r -lz
    > -lm]
    > --socket [/tmp/mysql.sock]
    > --port [3306]
    > --version [4.1.10a]
    > --libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lm]


    Thank you very much.
    On you Installation the pathes are correct.
    Did you also download a dmg-file and install with a *.pkg installer?

    --
    perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
    [29,77,98,111,105,29],[100,93,95,103,97,110]];
    for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'
    Martin Kissner, May 11, 2005
    #6
  7. Martin Kissner

    Guest

    Martin Kissner wrote:
    > wrote :
    > >
    > > Martin Kissner wrote:
    > >>
    > >> I'd ask you a favour:
    > >> Could you please post the output of
    > >> mysql_config
    > >> in Terminal?

    > >
    > > Usage: ./mysql_config [OPTIONS]
    > > Options:
    > > --cflags [-I/usr/local/mysql/include
    > > -fno-omit-frame-pointer]
    > > --include [-I/usr/local/mysql/include]
    > > --libs [-L/usr/local/mysql/lib -lmysqlclient -lz

    -lm]
    > > --libs_r [-L/usr/local/mysql/lib -lmysqlclient_r

    -lz
    > > -lm]
    > > --socket [/tmp/mysql.sock]
    > > --port [3306]
    > > --version [4.1.10a]
    > > --libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lm]

    >
    > Thank you very much.
    > On you Installation the pathes are correct.
    > Did you also download a dmg-file and install with a *.pkg installer?
    >


    exactly.
    , May 11, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JL
    Replies:
    0
    Views:
    1,134
  2. Andrew Crook

    DBD::CSV questions and is there a DBD::XML?

    Andrew Crook, Sep 2, 2003, in forum: Perl Misc
    Replies:
    2
    Views:
    161
    Andrew Crook
    Sep 11, 2003
  3. Mike Solomon

    DBD::mysqlPP v DBD::mysql

    Mike Solomon, Feb 16, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    201
    James Willmore
    Feb 16, 2004
  4. Martin Kißner
    Replies:
    2
    Views:
    117
    Martin Kißner
    Oct 2, 2006
  5. Jim Cochrane
    Replies:
    0
    Views:
    109
    Jim Cochrane
    Aug 25, 2007
Loading...

Share This Page