Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to install DBD::mysql on OS X Server 10.6 (mac mini server). But I'm missing the mysql headers apparently. Since mysql is already part of OS X Server 10.6, I would like to NOT install anything else (no fink or darwin ports installs), just whatever's needed to get DBD::mysql installed and working. Do you know how I could do that? Do I have to install the headers somewhere? And if so, where? (again: I don't want to install another version of mysql on the box, want to use the version it came with). Is there a way to install DBD::mysql without compiling any C files?

This is the error I get (the actual error is much longer, but these are the most meaningful bits, this is the first error reported).

Checking if your kit is complete...
Looks good
Unrecognized argument in LIBS ignored: '-pipe'
Note (probably harmless): No library found for -lmysqlclient
Multiple copies of Driver.xst found in: /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI/ /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level/auto/DBI/ at Makefile.PL line 907
Using DBI 1.611 (for perl 5.010000 on darwin-thread-multi-2level) installed in /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI/
Writing Makefile for DBD::mysql
cp lib/DBD/ blib/lib/DBD/
cp lib/DBD/mysql/ blib/lib/DBD/mysql/
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/ blib/lib/Bundle/DBD/
gcc-4.2 -c  -I/Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI -I/usr/include  -fno-omit-frame-pointer    -pipe   -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -Os   -DVERSION=\"4.014\" -DXS_VERSION=\"4.014\"  "-I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE"   dbdimp.c
In file included from dbdimp.c:20:
dbdimp.h:22:49: error: mysql.h: No such file or directory
dbdimp.h:23:45: error: mysqld_error.h: No such file or directory
dbdimp.h:25:49: error: errmsg.h: No such file or directory
share|improve this question

migrated from May 9 '10 at 21:39

This question came from our site for professional and enthusiast programmers.

up vote 4 down vote accepted

For OSX 10.6.3, the binaries are here

share|improve this answer
This actually looks like it is what I'm looking for. The only slight (possible) problem is that I have v5.0.88 of mysql, while this is v5.0.82. The it installs is by overwriting what's on the hard drive in order to add the headers etc. Is this safe to do? Replace current 5.0.88 with 5.0.82 – Zoran Simic May 8 '10 at 19:23
This was it, I didn't notice you updated the link to MySQL-53 (instead of originally MySQL-49). Works great, this is 5.0.88, just like the mysql that comes with 10.6.3. Thanks a lot for the answer!! – Zoran Simic May 8 '10 at 19:42
For whoever has the same problem: instructions on how to untar this package are here: (ellen, you should edit this response to specify this, instead of having it an another answer as currently). Did +1 for this answer, but someone has been modding your answers down for some reason... – Zoran Simic May 8 '10 at 20:06

Information on installing MySQL client binaries and headers for OSX 10.6:

share|improve this answer

Hope this will help you "Install MySQL and DBD::MySQL on Mac OS X" and for the error please have a look at "Bug #28419"

share|improve this answer
mysql-devel RPM? On OS X? What are you talking about. I think what you need to install is one of the packages that make up XCode... the mysql headers should be there somewhere. But first, try a mdfind "kMDItemFSName == 'mysql.h'", and if it produces any output, add -I/the/path/to/mysql.h/ into your CFLAGS (the path, not including mysql.h on the end). – Andrew McGregor May 7 '10 at 4:22
I did a similar installation on my OS X 10.6 client, but OS X server comes with mysql already installed, and I'd really want to stick to what's already there (I want to use the built in service management for mysql). Andrew, how can I go about adding the headers? I've installed Xcode (had to), but I don't see any option to check to get headers. The 'mdfind' you suggested doesn't produce any output. – Zoran Simic May 7 '10 at 5:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.