Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Howto install DBD-mysql on Mac OS X - Solution

Reply
Thread Tools

Howto install DBD-mysql on Mac OS X - Solution

 
 
Martin Kissner
Guest
Posts: n/a
 
      05-10-2005
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))}}'
 
Reply With Quote
 
 
 
 
ioneabu@yahoo.com
Guest
Posts: n/a
 
      05-10-2005

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?

 
Reply With Quote
 
 
 
 
Martin Kissner
Guest
Posts: n/a
 
      05-10-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) 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))}}'
 
Reply With Quote
 
Martin Kissner
Guest
Posts: n/a
 
      05-10-2005
(E-Mail Removed) 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))}}'
 
Reply With Quote
 
ioneabu@yahoo.com
Guest
Posts: n/a
 
      05-10-2005

Martin Kissner wrote:
> (E-Mail Removed) 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]

 
Reply With Quote
 
Martin Kissner
Guest
Posts: n/a
 
      05-11-2005
(E-Mail Removed) 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))}}'
 
Reply With Quote
 
ioneabu@yahoo.com
Guest
Posts: n/a
 
      05-11-2005

Martin Kissner wrote:
> (E-Mail Removed) 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Convert MAC to hex howto Peter Otten Python 0 10-07-2012 09:01 PM
Convert MAC to hex howto Johannes Graumann Python 2 10-07-2012 08:38 PM
Re: Convert MAC to hex howto Johannes Graumann Python 0 10-07-2012 08:38 PM
Re: Convert MAC to hex howto MRAB Python 0 10-07-2012 08:04 PM



Advertisments