For one reason or another, I've decided to install DBI/DBD on my laptop. In
attempting to do that, I've run across a few problems and questions.

Here are the steps I followed to install mysql, DBI, and DBD::mysql successfully. I'm running OS X 10.3.4 on a PowerBook, and did this install just a few weeks ago.


1. Install the developer tools and enable the root user.

2. Download the mysql installer from http://dev.mysql.com/downloads/mysql/4.0.html. I used the 'Installer package (Mac OS X v10.3) Standard 4.0.20'.

Install both the server and startup item (separate packages). Reboot, and the mysql server should be running. Check this with the Activity Monitor. The daemon 'mysqld' should be running with user 'mysql'.

3. Install DBI using CPAN. I start CPAN in terminal using the command 'sudo perl -MCPAN -e shell'. Once you have gone through the setup, and selected an assortment of CPAN servers, you will get the CPAN prompt. To install DBI, type the command 'install DBI'. This should go smoothly. It will be obvious if your install succeeded or failed. When using CPAN 'install', if any tests fail, no files are installed.

4. Before you proceed to install 'DBD::mysql', you will need to fix perl's Config.pm file, as explained by Edward Moy of Apple in a post to this list on October 15, 2003:

We recently discovered the DBD::mysql problem as well. The patch is to edit /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm, replacing:

        ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc'

with

        ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'

Unfortunately, this change is too late to get into Panther.
---------------------------------------------------------------
Edward Moy
Apple

This is an essential step, as DBD::mysql will not compile until you make this patch.


5. Now, you can use CPAN to compile and install 'DBD::mysql'. Type the command 'install DBD::mysql' as with DBI. The software will compile successfully (after first compiling some prerequisites), and pass most of its tests. But the process will end without installing because the tests were not 100% successful. The failed tests are not significant in this case, and you can finish the install process with the command 'force install DBD::mysql'. This will override the test requirement, and install the software.

-Bill
--

William B. Birkett <[EMAIL PROTECTED]>
Owner
Precision Color, Inc. - http://www.pcolor.com/
9200 General Drive, Plymouth, MI 48170 (USA)

Phone:  (734) 459-5640     FAX:    (734) 459-4210
Cell:   (734) 516-4790     Direct: (734) 414-3608

Reply via email to